Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Fixed windowsize  (Read 5100 times)

0 Members and 1 Guest are viewing this topic.

Cuban-Pete

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Fixed windowsize
« on: June 21, 2011, 07:04:09 pm »
Now I use:
Code: [Select]

while (window.IsOpened())
{
...
window.SetSize(800,600);
...


but perhaps there is a better way to give my program/window a fixed size?

I could not find anything in here: http://www.sfml-dev.org/documentation/2.0/classsf_1_1Window.php

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Fixed windowsize
« Reply #1 on: June 21, 2011, 07:11:07 pm »
You can specify the behavior in the style parameter of the constructor or Create().

Unfortunately, it seems like namespaces are not documented with the current Doxygen configuration, that is why sf::Style has no documentation.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Cuban-Pete

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Fixed windowsize
« Reply #2 on: June 21, 2011, 07:18:37 pm »
I can pick from:

close
default
FullScreen (did not work for me on win7 64bit)
none
resize
titlebar

I'm using close as style and now it is working good! Thanks!  :)

// I guess I cannot edit the documentation, it is no wiki. else I could add these options.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Fixed windowsize
« Reply #3 on: June 22, 2011, 08:00:13 am »
The sf::Style enum is documented in the window module page:
http://www.sfml-dev.org/documentation/2.0/group__window.php

It is generated from the source code, so no it cannot be edited ;)
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Fixed windowsize
« Reply #4 on: June 22, 2011, 01:20:22 pm »
Ah, it is an anomymous enum. For some interesting reason, Doxygen cannot autolink sf::Style::Default in the constructor description, but in the code of RenderWindow.hpp :?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything