mail[Wesnoth-commits] r20680 - in /trunk: changelog players_changelog src/editor/editor.cpp src/editor/editor.hpp


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

Header


Content

Posted by koraq on September 23, 2007 - 12:47:
Author: mordante
Date: Sun Sep 23 12:47:07 2007
New Revision: 20680

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20680&view=rev
Log:
A right click in floodfill mode now performs a flood fill in the editor.

Modified:
    trunk/changelog
    trunk/players_changelog
    trunk/src/editor/editor.cpp
    trunk/src/editor/editor.hpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=20680&r1=20679&r2=20680&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Sep 23 12:47:07 2007
@@ -10,6 +10,8 @@
     * A bit of dialogue polishing in 'The Coward'
  * language and i18n:
    * updated translations: Czech, German
+ * map editor:
+   * a right click in floodfill mode now performs a flood fill.
  * units:
    * balancing changes:
      * created undead variations for the 'bat' and 'gryphon' race

Modified: trunk/players_changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/players_changelog?rev=20680&r1=20679&r2=20680&view=diff
==============================================================================
--- trunk/players_changelog (original)
+++ trunk/players_changelog Sun Sep 23 12:47:07 2007
@@ -17,6 +17,9 @@
 
   * Language and translations
     * Updated translations: Czech, German.
+
+  * Map editor
+    * A right click in floodfill mode now performs a flood fill.
 
   * Unit changes and balancing
     * Created undead variations for the 'bat' and 'gryphon' race.

Modified: trunk/src/editor/editor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor.cpp?rev=20680&r1=20679&r2=20680&view=diff
==============================================================================
--- trunk/src/editor/editor.cpp (original)
+++ trunk/src/editor/editor.cpp Sun Sep 23 12:47:07 2007
@@ -425,7 +425,7 @@
                l_button_held_func_ = DRAW_TERRAIN;
        }
        else if (l_button_func_ == FLOOD_FILL) {
-               perform_flood_fill();
+               perform_flood_fill(palette_.selected_fg_terrain());
        }
        else if (l_button_func_ == SET_STARTING_POSITION) {
                perform_set_starting_pos();
@@ -441,6 +441,9 @@
                if(palette_.selected_fg_terrain() != terrain) {
                        palette_.select_bg_terrain(terrain);
                }
+       }
+       else if (l_button_func_ == FLOOD_FILL) {
+               perform_flood_fill(palette_.selected_bg_terrain());
        }
 }
 
@@ -570,9 +573,9 @@
        left_button_func_changed(SET_STARTING_POSITION);
 }
 
-void map_editor::perform_flood_fill() {
+void map_editor::perform_flood_fill(const t_translation::t_letter fill_with) 
{
        terrain_log log;
-       flood_fill(map_, selected_hex_, palette_.selected_fg_terrain(), &log);
+       flood_fill(map_, selected_hex_, fill_with, &log);
        std::vector<gamemap::location> to_invalidate;
        map_undo_action action;
        for (terrain_log::iterator it = log.begin(); it != log.end(); it++) {

Modified: trunk/src/editor/editor.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor.hpp?rev=20680&r1=20679&r2=20680&view=diff
==============================================================================
--- trunk/src/editor/editor.hpp (original)
+++ trunk/src/editor/editor.hpp Sun Sep 23 12:47:07 2007
@@ -131,7 +131,7 @@
        virtual void edit_update();
        virtual void edit_auto_update();
 
-       void perform_flood_fill();
+       void perform_flood_fill(const t_translation::t_letter fill_with);
        void perform_paste();
        void perform_set_starting_pos();
 




Related Messages


Powered by MHonArc, Updated Sun Sep 23 13:40:42 2007