mail[Wesnoth-commits] r20650 - /trunk/src/menu_events.cpp


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

Header


Content

Posted by esr on September 21, 2007 - 22:33:
Author: esr
Date: Fri Sep 21 22:32:30 2007
New Revision: 20650

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20650&view=rev
Log:
Stub code for editing unit traits in command mode.

Modified:
    trunk/src/menu_events.cpp

Modified: trunk/src/menu_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=20650&r1=20649&r2=20650&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Fri Sep 21 22:32:30 2007
@@ -2143,6 +2143,26 @@
                                        gui_->invalidate_unit();
                                }
                        }
+               } else if(game_config::debug && cmd == "buff") {
+                       const unit_map::iterator i = 
current_unit(mousehandler);
+                       if(i != units_.end()) {
+                               // FIXME: 'data' is the trait.  Set it.
+
+                               gui_->invalidate(i->first);
+                               gui_->invalidate_unit();
+                       }
+
+
+               } else if(game_config::debug && cmd == "unbuff") {
+                       const unit_map::iterator i = 
current_unit(mousehandler);
+                       if(i != units_.end()) {
+                               // FIXME: 'data' is the trait.  Clear it.
+
+                               gui_->invalidate(i->first);
+                               gui_->invalidate_unit();
+                       }
+
+
                } else if(game_config::debug && cmd == "create" && 
map_.on_board(mousehandler.get_last_hex())) {
                        const game_data::unit_type_map::const_iterator i = 
gameinfo_.unit_types.find(data);
                        if(i == gameinfo_.unit_types.end()) {




Related Messages


Powered by MHonArc, Updated Sat Sep 22 00:00:52 2007