SFML community forums

Help => Window => Topic started by: Cuban-Pete on June 21, 2011, 07:04:09 pm

Title: Fixed windowsize
Post by: Cuban-Pete 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
Title: Fixed windowsize
Post by: Nexus 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.
Title: Fixed windowsize
Post by: Cuban-Pete 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.
Title: Fixed windowsize
Post by: Laurent 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 ;)
Title: Fixed windowsize
Post by: Nexus 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 :?