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

@ -25,11 +25,12 @@ void EllipseDrawTool::gui_toolbox() {
using namespace ElementHelpers;
Toolbar& t = drawP.world.main.toolbar;
auto& gui = drawP.world.main.g.gui;
auto& toolConfig = drawP.world.main.toolConfig;
auto& fillStrokeMode = toolConfig.ellipseDraw.fillStrokeMode;
t.gui.new_id("ellipse draw tool", [&] {
text_label_centered(t.gui, "Draw Ellipse");
radio_button_selector(t.gui, "fill type", &fillStrokeMode, {
gui.new_id("ellipse draw tool", [&] {
text_label_centered(gui, "Draw Ellipse");
radio_button_selector(gui, "fill type", &fillStrokeMode, {
{"Fill only", 0},
{"Outline only", 1},
{"Fill and Outline", 2}