@@ -199,16 +199,24 @@ Editor::Editor() :
199199 m_widgets.insert (m_widgets.begin () + 5 , std::move (mode_button));
200200
201201 auto select_mode_mouse_button = std::make_unique<ButtonWidget>(
202- " images/engine/editor/select-mode0.png" , Vector (192 , 0 ), [] {});
202+ " images/engine/editor/select-mode0.png" , Vector (192 , 0 ), [this ] {
203+ m_toolbox_widget->set_tileselect_select_mode (0 );
204+ });
203205 select_mode_mouse_button->set_help_text (_ (" Draw mode (The current tool applies to the tile under the mouse)" ));
204206 auto select_mode_area_button = std::make_unique<ButtonWidget>(
205- " images/engine/editor/select-mode1.png" , Vector (224 , 0 ), [] {});
207+ " images/engine/editor/select-mode1.png" , Vector (224 , 0 ), [this ] {
208+ m_toolbox_widget->set_tileselect_select_mode (1 );
209+ });
206210 select_mode_area_button->set_help_text (_ (" Box draw mode (The current tool applies to an area / box drawn with the mouse)" ));
207211 auto select_mode_fill_button = std::make_unique<ButtonWidget>(
208- " images/engine/editor/select-mode2.png" , Vector (256 , 0 ), [] {});
212+ " images/engine/editor/select-mode2.png" , Vector (256 , 0 ), [this ] {
213+ m_toolbox_widget->set_tileselect_select_mode (2 );
214+ });
209215 select_mode_fill_button->set_help_text (_ (" Fill mode (The current tool applies to the empty area in the enclosed space that was clicked)" ));
210216 auto select_mode_same_button = std::make_unique<ButtonWidget>(
211- " images/engine/editor/select-mode3.png" , Vector (288 , 0 ), [] {});
217+ " images/engine/editor/select-mode3.png" , Vector (288 , 0 ), [this ] {
218+ m_toolbox_widget->set_tileselect_select_mode (3 );
219+ });
212220 select_mode_same_button->set_help_text (_ (" Replace mode (The current tool applies to all tiles that are the same tile as the one under the mouse)" ));
213221
214222 m_widgets.insert (m_widgets.begin () + 6 , std::move (select_mode_mouse_button));
0 commit comments