diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index d88309fb..bfd52915 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -1559,3 +1559,10 @@ void imguiDrawRect(float _x, float _y, float _width, float _height, uint32_t _ar { s_imgui.drawRect(_x, _y, _width, _height, _argb); } + +int imguiReserve(int _y) +{ + const int yy = s_imgui.m_widgetY; + s_imgui.m_widgetY += _y; + return yy; +} diff --git a/examples/common/imgui/imgui.h b/examples/common/imgui/imgui.h index 2418baaf..7a4f55b2 100644 --- a/examples/common/imgui/imgui.h +++ b/examples/common/imgui/imgui.h @@ -42,7 +42,7 @@ struct ImguiTextAlign inline uint32_t imguiRGBA(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a = 255) { return 0 - | (uint32_t(_r) << 0) + | (uint32_t(_r) << 0) | (uint32_t(_g) << 8) | (uint32_t(_b) << 16) | (uint32_t(_a) << 24) @@ -80,4 +80,6 @@ void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_ void imguiDrawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb); void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb); +int imguiReserve(int _y); + #endif // IMGUI_H_HEADER_GUARD