Thin brush panel, preview, and node utility shells
This commit is contained in:
@@ -5,12 +5,30 @@
|
||||
#include "canvas.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
|
||||
namespace pp::panopainter {
|
||||
|
||||
namespace {
|
||||
std::vector<NodePanelBrushPreset*> s_legacy_brush_preset_panels;
|
||||
}
|
||||
|
||||
void NodePanelBrushPreset::execute_preset_list_plan(const pp::app::BrushPresetListPlan& plan)
|
||||
{
|
||||
pp::panopainter::LegacyBrushPresetListServices services(*this);
|
||||
const auto status = pp::app::execute_brush_preset_list_plan(plan, services);
|
||||
if (!status.ok()) {
|
||||
LOG("Brush preset list action failed: %s", status.message);
|
||||
}
|
||||
}
|
||||
|
||||
void NodePanelBrushPreset::clear_brushes()
|
||||
{
|
||||
const auto plan = pp::app::plan_brush_preset_list_clear(
|
||||
static_cast<int>(m_container->m_children.size()));
|
||||
if (plan) {
|
||||
execute_preset_list_plan(plan.value());
|
||||
}
|
||||
}
|
||||
|
||||
namespace pp::panopainter {
|
||||
|
||||
void register_legacy_brush_preset_panel(NodePanelBrushPreset& panel)
|
||||
{
|
||||
s_legacy_brush_preset_panels.push_back(&panel);
|
||||
|
||||
Reference in New Issue
Block a user