MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / gui_toolbox

Method gui_toolbox

src/DrawingProgram/Tools/EraserTool.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void EraserTool::gui_toolbox(Toolbar& t) {
43 using namespace GUIStuff;
44 using namespace ElementHelpers;
45
46 auto& gui = drawP.world.main.g.gui;
47 gui.new_id("eraser tool", [&] {
48 text_label_centered(gui, "Eraser");
49 drawP.world.main.toolConfig.relative_width_gui(drawP, "Size");
50 text_label(gui, "Erase from:");
51 radio_button_selector(gui, "layer selector", &drawP.controls.layerSelector, {
52 {"Layer being edited", DrawingProgramLayerManager::LayerSelector::LAYER_BEING_EDITED},
53 {"All visible layers", DrawingProgramLayerManager::LayerSelector::ALL_VISIBLE_LAYERS}
54 });
55 checkbox_boolean_field(gui, "erase details", "Erase details (meshes only)", &drawP.world.main.toolConfig.eraser.eraseDetail);
56 });
57}
58
59void EraserTool::gui_phone_toolbox(PhoneDrawingProgramScreen& t) {
60 using namespace GUIStuff;

Callers

nothing calls this directly

Calls 6

text_label_centeredFunction · 0.85
text_labelFunction · 0.85
radio_button_selectorFunction · 0.85
checkbox_boolean_fieldFunction · 0.85
new_idMethod · 0.80
relative_width_guiMethod · 0.80

Tested by

no test coverage detected