Browse Source

Added imguiReserve().

Dario Manesku 11 years ago
parent
commit
8c815f2f95
2 changed files with 10 additions and 1 deletions
  1. 7 0
      examples/common/imgui/imgui.cpp
  2. 3 1
      examples/common/imgui/imgui.h

+ 7 - 0
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;
+}

+ 3 - 1
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