mail[Wesnoth-commits] r44922 - in /trunk/src: play_controller.hpp whiteboard/manager.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on July 30, 2010 - 11:40:
Author: gabba
Date: Fri Jul 30 11:40:56 2010
New Revision: 44922

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44922&view=rev
Log:
Whiteboard: disallow using the whiteboard when in linger mode.

Modified:
    trunk/src/play_controller.hpp
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/play_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.hpp?rev=44922&r1=44921&r2=44922&view=diff
==============================================================================
--- trunk/src/play_controller.hpp (original)
+++ trunk/src/play_controller.hpp Fri Jul 30 11:40:56 2010
@@ -134,6 +134,7 @@
        config to_config() const;
 
        bool is_skipping_replay() const { return skip_replay_;}
+       bool is_linger_mode() const { return linger_; }
 
        events::mouse_handler& get_mouse_handler_base();
        events::menu_handler& get_menu_handler() { return menu_handler_; }

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=44922&r1=44921&r2=44922&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Fri Jul 30 11:40:56 2010
@@ -164,7 +164,7 @@
 
 bool manager::can_execute_hotkey() const
 {
-       return !viewer_actions()->empty();
+       return !resources::controller->is_linger_mode() && 
!viewer_actions()->empty();
 }
 
 void manager::on_init_side()
@@ -317,7 +317,7 @@
 {
        route_.reset();
 
-       if (!active_) return;
+       if (!active_ || resources::controller->is_linger_mode()) return;
 
        /*
         * CHECK PRE-CONDITIONS
@@ -409,7 +409,7 @@
 
 void manager::save_temp_move()
 {
-       if (has_temp_move() && !executing_actions_)
+       if (has_temp_move() && !executing_actions_ && 
!resources::controller->is_linger_mode())
        {
                scoped_planned_unit_map planned_unit_map;
 
@@ -433,7 +433,7 @@
 
 void manager::save_temp_attack(const map_location& attack_from, const 
map_location& target_hex)
 {
-       if (active_ && !executing_actions_)
+       if (active_ && !executing_actions_ && 
!resources::controller->is_linger_mode())
        {
                arrow_ptr move_arrow;
                fake_unit_ptr fake_unit;
@@ -484,7 +484,7 @@
 {
        bool created_planned_recruit = false;
 
-       if (active_) {
+       if (active_ && !resources::controller->is_linger_mode()) {
                if (side_num != resources::screen->viewing_side())
                {
                        LOG_WB <<"manager::save_recruit called for a 
different side than viewing side.\n";
@@ -507,7 +507,7 @@
 
 void manager::contextual_execute()
 {
-       if (!(executing_actions_ || viewer_actions()->empty())
+       if (!(executing_actions_ || viewer_actions()->empty() || 
resources::controller->is_linger_mode())
                        && resources::controller->current_side() == 
resources::screen->viewing_side())
        {
                erase_temp_move();
@@ -541,7 +541,7 @@
 
 void manager::contextual_delete()
 {
-       if (!(executing_actions_ || viewer_actions()->empty()))
+       if (!(executing_actions_ || viewer_actions()->empty() || 
resources::controller->is_linger_mode()))
        {
                erase_temp_move();
                validate_viewer_actions();
@@ -568,7 +568,8 @@
 
 void manager::contextual_bump_up_action()
 {
-       if (!(executing_actions_ || viewer_actions()->empty()) && 
highlighter_)
+       if (!(executing_actions_ || viewer_actions()->empty() || 
resources::controller->is_linger_mode())
+                       && highlighter_)
        {
 
                validate_viewer_actions();
@@ -582,7 +583,8 @@
 
 void manager::contextual_bump_down_action()
 {
-       if (!(executing_actions_ || viewer_actions()->empty()) && 
highlighter_)
+       if (!(executing_actions_ || viewer_actions()->empty() || 
resources::controller->is_linger_mode())
+                       && highlighter_)
        {
 
                validate_viewer_actions();




Related Messages


Powered by MHonArc, Updated Fri Jul 30 12:00:25 2010