-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
imgui_toggle_palette.h
41 lines (30 loc) · 1.33 KB
/
imgui_toggle_palette.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "imgui.h"
// ImGuiTogglePalette: A collection of colors used to customize the rendering of a toggle widget.
// Leaving any ImVec4 as default (zero) will allow the theme color to be used for that member.
struct ImGuiTogglePalette
{
// The default knob color.
ImVec4 Knob;
// The default knob color, used when when the knob is hovered.
ImVec4 KnobHover;
// The background color of the toggle frame.
ImVec4 Frame;
// The background color of the toggle frame when the toggle is hovered.
ImVec4 FrameHover;
// The background color of the toggle frame's border used when ImGuiToggleFlags_BorderedFrame is specified.
ImVec4 FrameBorder;
// The shadow color of the toggle frame.
ImVec4 FrameShadow;
// The background color of the toggle knob's border used when ImGuiToggleFlags_BorderedKnob is specified.
ImVec4 KnobBorder;
// The shadow color of the toggle knob.
ImVec4 KnobShadow;
// The color of the accessibility label or glyph.
ImVec4 A11yGlyph;
};
namespace ImGui
{
void UnionPalette(ImGuiTogglePalette* target, const ImGuiTogglePalette* candidate, const ImVec4 colors[], bool v);
void BlendPalettes(ImGuiTogglePalette* result, const ImGuiTogglePalette& a, const ImGuiTogglePalette& b, float blend_amount);
}