Separate general GUI managing code and global configuration from toolbar UI code

This commit is contained in:
Yousef Khadadeh 2026-03-31 13:17:58 +03:00
parent 2abe7271a8
commit ea35397326
53 changed files with 859 additions and 788 deletions

View file

@ -20,8 +20,9 @@ DrawingProgramToolType RectSelectTool::get_type() {
void RectSelectTool::gui_toolbox() {
auto& t = drawP.world.main.toolbar;
t.gui.new_id("rectangle select tool", [&] {
GUIStuff::ElementHelpers::text_label_centered(t.gui, "Rectangle Select");
auto& gui = drawP.world.main.g.gui;
gui.new_id("rectangle select tool", [&] {
GUIStuff::ElementHelpers::text_label_centered(gui, "Rectangle Select");
drawP.selection.selection_gui();
});
}