Added imgui getters for widgetX and widgetY.

This commit is contained in:
Dario Manesku 2014-08-12 21:41:24 +01:00
parent eec6e82c29
commit 63d7db800c
2 changed files with 13 additions and 0 deletions

View file

@ -2594,6 +2594,16 @@ void imguiSeparatorLine(uint16_t _height)
s_imgui.separatorLine(_height); s_imgui.separatorLine(_height);
} }
int32_t imguiGetWidgetX()
{
return s_imgui.m_widgetX;
}
int32_t imguiGetWidgetY()
{
return s_imgui.m_widgetY;
}
bool imguiButton(const char* _text, bool _enabled, uint32_t _rgb0, int32_t _r) bool imguiButton(const char* _text, bool _enabled, uint32_t _rgb0, int32_t _r)
{ {
return s_imgui.button(_text, _enabled, _rgb0, _r); return s_imgui.button(_text, _enabled, _rgb0, _r);

View file

@ -128,6 +128,9 @@ void imguiUnindent(uint16_t _width = IMGUI_INDENT_VALUE);
void imguiSeparator(uint16_t _height = IMGUI_SEPARATOR_VALUE); void imguiSeparator(uint16_t _height = IMGUI_SEPARATOR_VALUE);
void imguiSeparatorLine(uint16_t _height = IMGUI_SEPARATOR_VALUE); void imguiSeparatorLine(uint16_t _height = IMGUI_SEPARATOR_VALUE);
int32_t imguiGetWidgetX();
int32_t imguiGetWidgetY();
bool imguiButton(const char* _text, bool _enabled = true, uint32_t _rgb0 = IMGUI_BUTTON_RGB0, int32_t _r = IMGUI_BUTTON_R); bool imguiButton(const char* _text, bool _enabled = true, uint32_t _rgb0 = IMGUI_BUTTON_RGB0, int32_t _r = IMGUI_BUTTON_R);
bool imguiItem(const char* _text, bool _enabled = true); bool imguiItem(const char* _text, bool _enabled = true);
bool imguiCheck(const char* _text, bool _checked, bool _enabled = true); bool imguiCheck(const char* _text, bool _checked, bool _enabled = true);