mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Unified color definition
This commit is contained in:
parent
e648368934
commit
9605d10caa
6 changed files with 59 additions and 79 deletions
|
@ -18,13 +18,15 @@ class ModelObject;
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static const float DEFAULT_BASE_COLOR[4] = { 0.625f, 0.625f, 0.625f, 1.0f };
|
||||
static const float DEFAULT_DRAG_COLOR[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
static const float DEFAULT_HIGHLIGHT_COLOR[4] = { 1.0f, 0.38f, 0.0f, 1.0f };
|
||||
static const float AXES_COLOR[][4] = { { 0.75f, 0.0f, 0.0f, 1.0f }, { 0.0f, 0.75f, 0.0f, 1.0f }, { 0.0f, 0.0f, 0.75f, 1.0f } };
|
||||
static const float CONSTRAINED_COLOR[4] = { 0.5f, 0.5f, 0.5f, 1.0f };
|
||||
|
||||
|
||||
static const std::array<float, 4> DEFAULT_BASE_COLOR = { 0.625f, 0.625f, 0.625f, 1.0f };
|
||||
static const std::array<float, 4> DEFAULT_DRAG_COLOR = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
static const std::array<float, 4> DEFAULT_HIGHLIGHT_COLOR = { 1.0f, 0.38f, 0.0f, 1.0f };
|
||||
static const std::array<std::array<float, 4>, 3> AXES_COLOR = {{
|
||||
{ 0.75f, 0.0f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.75f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f, 0.75f, 1.0f }
|
||||
}};
|
||||
static const std::array<float, 4> CONSTRAINED_COLOR = { 0.5f, 0.5f, 0.5f, 1.0f };
|
||||
|
||||
class ImGuiWrapper;
|
||||
class GLCanvas3D;
|
||||
|
@ -93,9 +95,9 @@ protected:
|
|||
unsigned int m_sprite_id;
|
||||
int m_hover_id;
|
||||
bool m_dragging;
|
||||
float m_base_color[4];
|
||||
float m_drag_color[4];
|
||||
float m_highlight_color[4];
|
||||
std::array<float, 4> m_base_color;
|
||||
std::array<float, 4> m_drag_color;
|
||||
std::array<float, 4> m_highlight_color;
|
||||
mutable std::vector<Grabber> m_grabbers;
|
||||
ImGuiWrapper* m_imgui;
|
||||
bool m_first_input_window_render;
|
||||
|
@ -138,7 +140,7 @@ public:
|
|||
int get_hover_id() const { return m_hover_id; }
|
||||
void set_hover_id(int id);
|
||||
|
||||
void set_highlight_color(const float* color);
|
||||
void set_highlight_color(const std::array<float, 4>& color);
|
||||
|
||||
void enable_grabber(unsigned int id);
|
||||
void disable_grabber(unsigned int id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue