add grids panel
This commit is contained in:
@@ -136,6 +136,12 @@ void App::init_sidebar()
|
||||
stroke->create();
|
||||
stroke->loaded();
|
||||
|
||||
grid = std::make_shared<NodePanelGrid>();
|
||||
grid->m_manager = &layout;
|
||||
grid->init();
|
||||
grid->create();
|
||||
grid->loaded();
|
||||
|
||||
presets = std::make_shared<NodePanelBrushPreset>();
|
||||
presets->m_manager = &layout;
|
||||
presets->init();
|
||||
@@ -240,6 +246,14 @@ void App::init_sidebar()
|
||||
button->set_color(panels->get_child_index(layers.get()) == -1 ? color_button_normal : color_button_hlight);
|
||||
};
|
||||
}
|
||||
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-grids-panel"))
|
||||
{
|
||||
button->on_click = [this, button](Node*) {
|
||||
panels->get_child_index(grid.get()) == -1 ? panels->add_child(grid) : panels->remove_child(grid.get());
|
||||
panels->fix_scroll();
|
||||
button->set_color(panels->get_child_index(grid.get()) == -1 ? color_button_normal : color_button_hlight);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void App::init_toolbar_draw()
|
||||
|
||||
Reference in New Issue
Block a user