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

@ -30,11 +30,13 @@ void EditTool::gui_toolbox() {
using namespace ElementHelpers;
Toolbar& t = drawP.world.main.toolbar;
auto& gui = drawP.world.main.g.gui;
if(objInfoBeingEdited)
compEditTool->edit_gui(objInfoBeingEdited);
else {
t.gui.new_id("edit tool", [&] {
text_label_centered(t.gui, "Edit");
gui.new_id("edit tool", [&] {
text_label_centered(gui, "Edit");
});
}
}