// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiSetCondition_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
@ -360,7 +360,7 @@ int main(int argc, char** argv)
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call this, because positions are saved in .ini file. Here we just want to make the demo initial state a bit more friendly!
@ -293,7 +293,7 @@ int main(int argc, char** argv)
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call this, because positions are saved in .ini file. Here we just want to make the demo initial state a bit more friendly!
// If we happen to move the window while it is being appended to (which is a bad idea - will smear) let's at least offset the cursor
window->DC.CursorPos+=(window->Pos-old_pos);
window->DC.CursorPos+=(window->Pos-old_pos);// As we happen to move the window while it is being appended to (which is a bad idea - will smear) let's at least offset the cursor
// - struct ImGuiTextBuffer // Text buffer for logging/accumulating text
// - struct ImGuiStorage // Custom key value storage (if you need to alter open/close states manually)
// - struct ImDrawList // Draw command list
// - struct ImBitmapFont // Bitmap font loader
// - struct ImFont // Bitmap font loader
// ImGui End-user API
// In a namespace so that user can add extra functions (e.g. Value() helpers for your vector or common types)
@ -149,11 +150,6 @@ namespace ImGui
IMGUI_APIvoidBeginChild(constchar*str_id,ImVec2size=ImVec2(0,0),boolborder=false,ImGuiWindowFlagsextra_flags=0);// size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). on each axis.
IMGUI_APIvoidEndChild();
IMGUI_APIboolGetWindowIsFocused();
IMGUI_APIImVec2GetWindowSize();
IMGUI_APIfloatGetWindowWidth();
IMGUI_APIvoidSetWindowSize(constImVec2&size);// set to ImVec2(0,0) to force an auto-fit
IMGUI_APIImVec2GetWindowPos();// you should rarely need/care about the window position, but it can be useful if you want to use your own drawing.
IMGUI_APIvoidSetWindowPos(constImVec2&pos);// set current window pos.
IMGUI_APIImVec2GetContentRegionMax();// window or current column boundaries
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows.
IMGUI_APIImVec2GetWindowPos();// you should rarely need/care about the window position, but it can be useful if you want to do your own drawing.
IMGUI_APIImVec2GetWindowSize();// get current window position.
IMGUI_APIfloatGetWindowWidth();
IMGUI_APIboolGetWindowCollapsed();
IMGUI_APIvoidSetWindowPos(constImVec2&pos,ImGuiSetConditioncond=0);// set current window position.
IMGUI_APIvoidSetWindowSize(constImVec2&size,ImGuiSetConditioncond=0);// set current window size. set to ImVec2(0,0) to force an auto-fit
IMGUI_APIvoidSetWindowCollapsed(boolcollapsed,ImGuiSetConditioncond=0);// set current window collapsed state.
IMGUI_APIvoidSetNextWindowPos(constImVec2&pos,ImGuiSetConditioncond=0);// set next window position.
IMGUI_APIvoidSetNextWindowSize(constImVec2&size,ImGuiSetConditioncond=0);// set next window size. set to ImVec2(0,0) to force an auto-fit
IMGUI_APIvoidSetNextWindowCollapsed(boolcollapsed,ImGuiSetConditioncond=0);// set next window collapsed state.
IMGUI_APIvoidSetScrollPosHere();// adjust scrolling position to center into the current cursor position.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use 'offset' to access sub components of a multiple component widget.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget.
IMGUI_APIvoidSetTreeStateStorage(ImGuiStorage*tree);// replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it).
IMGUI_APIImGuiStorage*GetTreeStateStorage();
@ -279,7 +286,6 @@ namespace ImGui
IMGUI_APIvoidLogToClipboard(intmax_depth=-1);
// Utilities
IMGUI_APIvoidSetNewWindowDefaultPos(constImVec2&pos);// set position of window that do
IMGUI_APIboolIsItemHovered();// was the last item active area hovered by mouse?
IMGUI_APIboolIsItemFocused();// was the last item focused for keyboard input?
IMGUI_APIImVec2GetItemBoxMin();// get bounding box of last item
@ -422,6 +428,15 @@ enum ImGuiColorEditMode_
ImGuiColorEditMode_HEX=2
};
// Condition flags for ImGui::SetWindow***() and SetNextWindow***() functions
// Those functions treat 0 as a shortcut to ImGuiSetCondition_Always
enumImGuiSetCondition_
{
ImGuiSetCondition_Always=1<<0,// Set the variable
ImGuiSetCondition_FirstUseThisSession=1<<1,// Only set the variable on the first call for this window (once per session)
ImGuiSetCondition_FirstUseEver=1<<2,// Only set the variable if the window doesn't exist in the .ini file
};
structImGuiStyle
{
floatAlpha;// Global alpha applies to everything in ImGui