add grids panel (part 2)
This commit is contained in:
BIN
data/ui/grid.png
Normal file
BIN
data/ui/grid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
33
engine/node_panel_grid.cpp
Normal file
33
engine/node_panel_grid.cpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "node_panel_grid.h"
|
||||||
|
#include "canvas.h"
|
||||||
|
|
||||||
|
Node* NodePanelGrid::clone_instantiate() const
|
||||||
|
{
|
||||||
|
return new NodePanelGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NodePanelGrid::clone_finalize(Node* dest) const
|
||||||
|
{
|
||||||
|
NodePanelGrid* n = static_cast<NodePanelGrid*>(dest);
|
||||||
|
n->init_controls();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NodePanelGrid::init()
|
||||||
|
{
|
||||||
|
init_template("tpl-panel-grid");
|
||||||
|
init_controls();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NodePanelGrid::init_controls()
|
||||||
|
{
|
||||||
|
m_groud_opacity = find<NodeSliderH>("grid-ground-opacity");
|
||||||
|
m_groud_scale = find<NodeSliderH>("grid-ground-scale");
|
||||||
|
m_groud_value = find<NodeSliderH>("grid-ground-value");
|
||||||
|
m_groud_height = find<NodeSliderH>("grid-ground-height");
|
||||||
|
m_box_opacity = find<NodeSliderH>("grid-box-opacity");
|
||||||
|
m_box_width = find<NodeSliderH>("grid-box-width");
|
||||||
|
m_box_height = find<NodeSliderH>("grid-box-height");
|
||||||
|
m_box_depth = find<NodeSliderH>("grid-box-depth");
|
||||||
|
}
|
||||||
25
engine/node_panel_grid.h
Normal file
25
engine/node_panel_grid.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "node.h"
|
||||||
|
#include "node_stroke_preview.h"
|
||||||
|
#include "node_slider.h"
|
||||||
|
#include "brush.h"
|
||||||
|
#include "node_checkbox.h"
|
||||||
|
#include "node_combobox.h"
|
||||||
|
|
||||||
|
class NodePanelGrid : public Node
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NodeSliderH* m_groud_opacity;
|
||||||
|
NodeSliderH* m_groud_scale;
|
||||||
|
NodeSliderH* m_groud_value;
|
||||||
|
NodeSliderH* m_groud_height;
|
||||||
|
NodeSliderH* m_box_opacity;
|
||||||
|
NodeSliderH* m_box_width;
|
||||||
|
NodeSliderH* m_box_height;
|
||||||
|
NodeSliderH* m_box_depth;
|
||||||
|
|
||||||
|
virtual Node* clone_instantiate() const override;
|
||||||
|
virtual void clone_finalize(Node* dest) const override;
|
||||||
|
virtual void init() override;
|
||||||
|
void init_controls();
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user