A right click in floodfill mode now performs a flood fill in the editor.

This commit is contained in:
Mark de Wever 2007-09-23 10:47:07 +00:00
parent 45d4383970
commit 076e49f730
4 changed files with 12 additions and 4 deletions

View file

@ -10,6 +10,8 @@ Version 1.3.8+svn:
* 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

View file

@ -18,6 +18,9 @@ Version 1.3.8+svn:
* 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.

View file

@ -425,7 +425,7 @@ void map_editor::left_click(const gamemap::location hex_clicked) {
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();
@ -442,6 +442,9 @@ void map_editor::right_click(const gamemap::location hex_clicked ) {
palette_.select_bg_terrain(terrain);
}
}
else if (l_button_func_ == FLOOD_FILL) {
perform_flood_fill(palette_.selected_bg_terrain());
}
}
/**
@ -570,9 +573,9 @@ void map_editor::edit_set_start_pos() {
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++) {

View file

@ -131,7 +131,7 @@ public:
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();