Author: mordante
Date: Sun Aug 24 21:16:03 2008
New Revision: 28944
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28944&view=rev
Log:
Fix the assumption the TITLE_RESULT starts at 0.
After committing r28932 some other problems got noticed and fixed in
this commit.
Modified:
trunk/src/titlescreen.cpp
Modified: trunk/src/titlescreen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=28944&r1=28943&r2=28944&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Sun Aug 24 21:16:03 2008
@@ -423,7 +423,7 @@
max_width = std::max<size_t>(max_width,buttons.back().width());
n_menubuttons = b;
- if(b == QUIT_GAME) break; // Menu-frame ends at the
quit-button
+ if(b + TUTORIAL == QUIT_GAME) break; // Menu-frame ends at
the quit-button
}
SDL_Rect main_dialog_area = {menu_xbase-padding, menu_ybase-padding,
max_width+padding*2,
@@ -442,18 +442,18 @@
for(b = 0; b != nbuttons; ++b) {
buttons[b].set_width(max_width);
buttons[b].set_location(menu_xbase + b*menu_xincr, menu_ybase +
b*menu_yincr);
- if(b == QUIT_GAME) break;
- }
-
- b = TIP_PREVIOUS;
+ if(b + TUTORIAL == QUIT_GAME) break;
+ }
+
+ b = TIP_PREVIOUS - TUTORIAL;
gui::button
previous_tip_button(screen.video(),sgettext(button_labels[b]),button::TYPE_PRESS,"lite_small");
previous_tip_button.set_help_string( sgettext(button_labels[b] ));
- b = TIP_NEXT;
+ b = TIP_NEXT - TUTORIAL;
gui::button
next_tip_button(screen.video(),sgettext(button_labels[b]),button::TYPE_PRESS,"lite_small");
next_tip_button.set_help_string( sgettext(button_labels[b] ));
- b = SHOW_HELP;
+ b = SHOW_HELP - TUTORIAL;
gui::button
help_tip_button(screen.video(),sgettext(button_labels[b]),button::TYPE_PRESS,"lite_small");
help_tip_button.set_help_string( sgettext(button_labels[b] ));
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits