forked from inkyblackness/imgui-go
-
Notifications
You must be signed in to change notification settings - Fork 15
/
StyleWrapper.cpp
51 lines (44 loc) · 1.43 KB
/
StyleWrapper.cpp
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
42
43
44
45
46
47
48
49
50
51
#include "imguiWrappedHeader.h"
#include "StyleWrapper.h"
#include "WrapperConverter.h"
void iggStyleGetItemSpacing(IggGuiStyle handle, IggVec2 *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
exportValue(*value, style->ItemSpacing);
}
void iggStyleGetItemInnerSpacing(IggGuiStyle handle, IggVec2 *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
exportValue(*value, style->ItemInnerSpacing);
}
void iggStyleGetWindowPadding(IggGuiStyle handle, IggVec2 *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
exportValue(*value, style->WindowPadding);
}
void iggStyleGetFramePadding(IggGuiStyle handle, IggVec2 *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
exportValue(*value, style->FramePadding);
}
void iggStyleSetColor(IggGuiStyle handle, int colorID, IggVec4 const *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
if ((colorID >= 0) && (colorID < ImGuiCol_COUNT))
{
importValue(style->Colors[colorID], *value);
}
}
void iggStyleGetColor(IggGuiStyle handle, int index, IggVec4 *value)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle*>(handle);
if ((index >= 0) && (index < ImGuiCol_COUNT))
{
exportValue(*value, style->Colors[index]);
}
}
void iggStyleScaleAllSizes(IggGuiStyle handle, float scale)
{
ImGuiStyle *style = reinterpret_cast<ImGuiStyle *>(handle);
style->ScaleAllSizes(scale);
}