|
|
@@ -120,10 +120,12 @@ namespace ImGui
|
|
|
IMGUI_API void NewFrame(); // start a new ImGui frame, you can submit any command from this point until NewFrame()/Render().
|
|
|
IMGUI_API void Render(); // ends the ImGui frame, finalize rendering data, then call your io.RenderDrawListsFn() function if set.
|
|
|
IMGUI_API void Shutdown();
|
|
|
- IMGUI_API void ShowUserGuide(); // help block
|
|
|
- IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // style editor block. you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
|
|
|
- IMGUI_API void ShowTestWindow(bool* p_open = NULL); // test window demonstrating ImGui features
|
|
|
- IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // metrics window for debugging ImGui (browse draw commands, individual vertices, window list, etc.)
|
|
|
+
|
|
|
+ // Demo/Debug/Info
|
|
|
+ IMGUI_API void ShowTestWindow(bool* p_open = NULL); // create demo/test window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
|
|
|
+ IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create metrics window. display ImGui internals: browse window list, draw commands, individual vertices, basic internal state, etc.
|
|
|
+ IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
|
|
|
+ IMGUI_API void ShowUserGuide(); // add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).
|
|
|
|
|
|
// Window
|
|
|
IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // push window to the stack and start appending to it. see .cpp for details. return false when window is collapsed, so you can early out in your code. 'bool* p_open' creates a widget on the upper-right to close the window (which sets your bool to false).
|
|
|
@@ -467,7 +469,7 @@ namespace ImGui
|
|
|
IMGUI_API ImGuiContext* GetCurrentContext();
|
|
|
IMGUI_API void SetCurrentContext(ImGuiContext* ctx);
|
|
|
|
|
|
- // Obsolete (will be removed)
|
|
|
+ // Obsolete functions (Will be removed! Also see 'API BREAKING CHANGES' section in imgui.cpp)
|
|
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+
|
|
|
static inline ImFont* GetWindowFont() { return GetFont(); } // OBSOLETE 1.48+
|
|
|
@@ -1156,6 +1158,7 @@ struct ImDrawVert
|
|
|
// You can override the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h
|
|
|
// The code expect ImVec2 pos (8 bytes), ImVec2 uv (8 bytes), ImU32 col (4 bytes), but you can re-order them or add other fields as needed to simplify integration in your engine.
|
|
|
// The type has to be described within the macro (you can either declare the struct or use a typedef)
|
|
|
+// NOTE: IMGUI DOESN'T CLEAR THE STRUCTURE AND DOESN'T CALL A CONSTRUCTOR SO ANY CUSTOM FIELD WILL BE UNINITIALIZED. IF YOU ADD EXTRA FIELDS (SUCH AS A 'Z' COORDINATES) YOU WILL NEED TO CLEAR THEM DURING RENDER OR TO IGNORE THEM.
|
|
|
IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
|
|
|
#endif
|
|
|
|
|
|
@@ -1281,7 +1284,7 @@ struct ImFontConfig
|
|
|
float SizePixels; // // Size in pixels for rasterizer
|
|
|
int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
|
|
|
bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
|
|
|
- ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs
|
|
|
+ ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
|
|
|
ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input
|
|
|
const ImWchar* GlyphRanges; // // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE.
|
|
|
bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
|