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

Author Topic: Disabling Re-size  (Read 14267 times)

0 Members and 1 Guest are viewing this topic.

Shay9999

  • Newbie
  • *
  • Posts: 24
    • View Profile
Disabling Re-size
« 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 ^_^
C++-Trainee
SFML-Trainee

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Disabling Re-size
« Reply #1 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... ;)
Laurent Gomila - SFML developer

Shay9999

  • Newbie
  • *
  • Posts: 24
    • View Profile
Disabling Re-size
« Reply #2 on: July 18, 2011, 09:12:08 am »
I know, but I'm high as fuck
C++-Trainee
SFML-Trainee

Shay9999

  • Newbie
  • *
  • Posts: 24
    • View Profile
Disabling Re-size
« Reply #3 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.
C++-Trainee
SFML-Trainee

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Disabling Re-size
« Reply #4 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.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
Disabling Re-size
« Reply #5 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.

Shay9999

  • Newbie
  • *
  • Posts: 24
    • View Profile
Disabling Re-size
« Reply #6 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 ^_^
C++-Trainee
SFML-Trainee