SFML community forums

Help => Window => Topic started by: Shay9999 on July 18, 2011, 08:22:06 am

Title: Disabling Re-size
Post by: Shay9999 on July 18, 2011, 08:22:06 am
Hey, I don't know if this is a function already, I couldn't find it, but is there a way to disable the option to re-size the window? Like, get rid of the maximize button and make it impossible for the user to increase the height and width of the window >_>?

Please respond ^_^
Title: Disabling Re-size
Post by: Laurent on July 18, 2011, 08:57:36 am
You can choose the style of the window with the 3rd argument of the constructor or Create function.

Quote
Please respond ^_^

This is not necessary to get answers, you know... ;)
Title: Disabling Re-size
Post by: Shay9999 on July 18, 2011, 09:12:08 am
I know, but I'm high as fuck
Title: Disabling Re-size
Post by: Shay9999 on July 18, 2011, 09:48:53 am
mmkay, so this is what happened and this is what didn't:

Code: [Select]
sf::RenderWindow Window(Program, "My Program", sf::Style::Resize = 0, 0);


and no worky. What's wrong? Be back latez.
Title: Disabling Re-size
Post by: Groogy on July 18, 2011, 10:08:43 am
Because that's not how enumerations work? It doesn't even compile because it's not proper C++. Maybe you should be sober while programming? After all it's a brain activity.
Title: Disabling Re-size
Post by: thePyro_13 on July 18, 2011, 12:47:02 pm
Styles don't need  to equal anything, they just are.

Code: [Select]
sf::RenderWindow Window(Program, "My Program", sf::Style::Resize, 0);

Try out all the different styles by compiling and changing the style between Resize and the other options, you'll quickly see how it works, and what the different options do.
Title: Disabling Re-size
Post by: Shay9999 on July 18, 2011, 08:59:23 pm
Quote from: "Groogy"
Maybe you should be sober while programming? After all it's a brain activity.


Yeah, good point...

Quote from: "Shay9999"
no worky. What's wrong? Be back latez.


Wow, I sound like the freaks I make fun of.

Quote from: "thePyro_13"
Styles don't need  to equal anything, they just are.

Code: [Select]
sf::RenderWindow Window(Program, "My Program", sf::Style::Resize, 0);

Try out all the different styles by compiling and changing the style between Resize and the other options, you'll quickly see how it works, and what the different options do.


Thanks for the sample code <3

I think I got it working now, ty everyone ^_^