I created a class that creates buttons for the user and I gave it some members to set the justification and the position.
I have about 6 or so buttons created in the format of a menu and a strange thing is happening with them.
I pose you this question: "Does it make any sense that multiple objects with the EXACT same constructor and argument values, the EXACT same members and argument values, with no value changes of any kind, excluding a single boolean when the object is clicked, between creation and drawing come out different?"
Didn't think so. Well, this is the weirdest thing I've seen in a while.
The menu is divided into a few pages. I'll show you two of them because that's all I have programmed.
Uploaded with
ImageShack.us^ These buttons are actually spot on. They are centered and everything... In fullscreen. I can't get them to center in the window, but when it's in fullscreen they are perfect.
By
wander_lazoren at 2011-01-09
^ It says Story Mode on the Options menu because I was testing to see if the length of the string had anything to do with it.
These however, are totally screwed up. The information for the two sections of buttons is exactly the same. I had the console display the numbers and the numbers came out were displayed the same.
I don't know if this is a compiler error or if this is SFML acting up or what.
Every single button had these members used with these arguments.
StoryMode.SF_Text.SetFont(TwoForJuan);
StoryMode.SetText("Story Mode");
StoryMode.SetPosition(StartWindow.GetWidth()/2 - StoryMode.WidthHeight.x/2, 347);
StoryMode.SetHighlightColor("YELLOW");
StoryMode.SetButtonColor("WHITE", "WHITE");
Starting after the creation here is exactly what happens in the code until the rendering of the options menu.
1. Wait for event of clicking on a button (Main Menu is displayed)
2. Set Button.Clicked to true.
3. Enter new while loop and event loop.
4. Wait for event of clicking on a button (Options Menu is displayed)
5. Set Button.Clicked to true.
6. Enter new while loop and event loop.
7. This stuff repeats until you either close the window or press the exit button.
Notice that no values were changed excluding the boolean to say when you clicked the button.