Author: tschmitz
Date: Sat Aug 27 01:44:03 2011
New Revision: 50932

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50932&view=rev
Log:
Added hide_whiteboard to general preferences.

Modified:
    trunk/src/game_preferences_display.cpp
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/game_preferences_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_preferences_display.cpp?rev=50932&r1=50931&r2=50932&view=diff
==============================================================================
--- trunk/src/game_preferences_display.cpp (original)
+++ trunk/src/game_preferences_display.cpp Sat Aug 27 01:44:03 2011
@@ -113,9 +113,9 @@
                        friends_list_button_, friends_back_button_,
                        friends_add_friend_button_, friends_add_ignore_button_,
                        friends_remove_button_, show_floating_labels_button_,
-                       turn_dialog_button_, whiteboard_on_start_button_, 
turn_bell_button_,
-                       show_team_colors_button_, show_color_cursors_button_,
-                       show_haloing_button_, video_mode_button_,
+                       turn_dialog_button_, whiteboard_on_start_button_,
+                       hide_whiteboard_button_, turn_bell_button_, 
show_team_colors_button_,
+                       show_color_cursors_button_, show_haloing_button_, 
video_mode_button_,
                        theme_button_, hotkeys_button_,
                        advanced_button_, sound_button_,
                        music_button_, chat_timestamp_button_,
@@ -183,6 +183,7 @@
          show_floating_labels_button_(disp.video(), _("Show Floating Labels"), 
gui::button::TYPE_CHECK),
          turn_dialog_button_(disp.video(), _("Turn Dialog"), 
gui::button::TYPE_CHECK),
          whiteboard_on_start_button_(disp.video(), _("Enable Planning Mode on 
Start"), gui::button::TYPE_CHECK),
+         hide_whiteboard_button_(disp.video(), _("Hide Allies' Plans by 
Default"), gui::button::TYPE_CHECK),
          turn_bell_button_(disp.video(), _("Turn Bell"), 
gui::button::TYPE_CHECK),
          show_team_colors_button_(disp.video(), _("Show Team Colors"), 
gui::button::TYPE_CHECK),
          show_color_cursors_button_(disp.video(), _("Show Color Cursors"), 
gui::button::TYPE_CHECK),
@@ -401,6 +402,9 @@
 
        
whiteboard_on_start_button_.set_check(enable_whiteboard_mode_on_start());
        whiteboard_on_start_button_.set_help_string(_("Activates Planning Mode 
on game start"));
+
+       hide_whiteboard_button_.set_check(hide_whiteboard());
+       hide_whiteboard_button_.set_help_string(_("Hides allies' Planning Mode 
plans in multiplayer games"));
 
        turn_bell_button_.set_check(turn_bell());
        turn_bell_button_.set_help_string(_("Play a bell sound at the beginning 
of your turn"));
@@ -461,6 +465,7 @@
        h.push_back(&show_floating_labels_button_);
        h.push_back(&turn_dialog_button_);
        h.push_back(&whiteboard_on_start_button_);
+       h.push_back(&hide_whiteboard_button_);
        h.push_back(&turn_bell_button_);
        h.push_back(&UI_sound_button_);
        h.push_back(&show_team_colors_button_);
@@ -532,6 +537,7 @@
        ypos += item_interline; show_ai_moves_button_.set_location(rect.x, 
ypos);
        ypos += short_interline; turn_dialog_button_.set_location(rect.x, ypos);
        ypos += short_interline; 
whiteboard_on_start_button_.set_location(rect.x, ypos);
+       ypos += short_interline; hide_whiteboard_button_.set_location(rect.x, 
ypos);
        ypos += short_interline; 
interrupt_when_ally_sighted_button_.set_location(rect.x, ypos);
        ypos += item_interline; save_replays_button_.set_location(rect.x, ypos);
        ypos += short_interline; delete_saves_button_.set_location(rect.x, 
ypos);
@@ -727,6 +733,8 @@
                        set_turn_dialog(turn_dialog_button_.checked());
                if (whiteboard_on_start_button_.pressed())
                        
set_enable_whiteboard_mode_on_start(whiteboard_on_start_button_.checked());
+               if (hide_whiteboard_button_.pressed())
+                       set_hide_whiteboard(hide_whiteboard_button_.checked());
                if (hotkeys_button_.pressed()) {
                        show_hotkeys_dialog(disp_);
                        parent->clear_buttons();
@@ -1119,6 +1127,7 @@
        show_ai_moves_button_.hide(hide_general);
        turn_dialog_button_.hide(hide_general);
        whiteboard_on_start_button_.hide(hide_general);
+       hide_whiteboard_button_.hide(hide_general);
        interrupt_when_ally_sighted_button_.hide(hide_general);
        hotkeys_button_.hide(hide_general);
        save_replays_button_.hide(hide_general);

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=50932&r1=50931&r2=50932&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Sat Aug 27 01:44:03 2011
@@ -995,12 +995,10 @@
        switch(selection)
        {
        case 0:
-               preferences::set_hide_whiteboard(false);
                foreach(team* t, allies)
                        team_plans_hidden_[t->side()-1]=false;
                break;
        case 1:
-               preferences::set_hide_whiteboard(true);
                foreach(team* t, allies)
                        team_plans_hidden_[t->side()-1]=true;
                break;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to