mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Update to ImGui 1.65.
This commit is contained in:
parent
9d4bdf0c28
commit
9eb04ea817
897
imgui/imgui.cpp
897
imgui/imgui.cpp
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.64
|
||||
// dear imgui, v1.65
|
||||
// (headers)
|
||||
|
||||
// See imgui.cpp file for documentation.
|
||||
@ -23,8 +23,8 @@
|
||||
|
||||
// Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY00 then bounced up to XYY01 when release tagging happens)
|
||||
#define IMGUI_VERSION "1.64"
|
||||
#define IMGUI_VERSION_NUM 16401
|
||||
#define IMGUI_VERSION "1.65"
|
||||
#define IMGUI_VERSION_NUM 16501
|
||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert))
|
||||
|
||||
// Define attributes of all API symbols declarations (e.g. for DLL under Windows)
|
||||
@ -814,10 +814,10 @@ enum ImGuiKey_
|
||||
ImGuiKey_COUNT
|
||||
};
|
||||
|
||||
// [BETA] Gamepad/Keyboard directional navigation
|
||||
// Gamepad/Keyboard directional navigation
|
||||
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
|
||||
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Back-end: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
|
||||
// Read instructions in imgui.cpp for more details. Download PNG/PSD at goo.gl/9LgVZW.
|
||||
// Read instructions in imgui.cpp for more details. Download PNG/PSD at http://goo.gl/9LgVZW.
|
||||
enum ImGuiNavInput_
|
||||
{
|
||||
// Gamepad Mapping
|
||||
@ -1061,7 +1061,7 @@ struct ImGuiStyle
|
||||
float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar.
|
||||
float GrabRounding; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
|
||||
ImVec2 ButtonTextAlign; // Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered.
|
||||
ImVec2 DisplayWindowPadding; // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
|
||||
ImVec2 DisplayWindowPadding; // Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
|
||||
ImVec2 DisplaySafeAreaPadding; // If you cannot see the edges of your screen (e.g. on a TV) increase the safe area padding. Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
|
||||
float MouseCursorScale; // Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
|
||||
bool AntiAliasedLines; // Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
|
||||
@ -1078,12 +1078,12 @@ struct ImGuiStyle
|
||||
struct ImGuiIO
|
||||
{
|
||||
//------------------------------------------------------------------
|
||||
// Settings (fill once) // Default value:
|
||||
// Configuration (fill once) // Default value:
|
||||
//------------------------------------------------------------------
|
||||
|
||||
ImGuiConfigFlags ConfigFlags; // = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
|
||||
ImGuiBackendFlags BackendFlags; // = 0 // Set ImGuiBackendFlags_ enum. Set by imgui_impl_xxx files or custom back-end to communicate features supported by the back-end.
|
||||
ImVec2 DisplaySize; // <unset> // Display size, in pixels. For clamping windows positions.
|
||||
ImVec2 DisplaySize; // <unset> // Main display size, in pixels. For clamping windows positions.
|
||||
float DeltaTime; // = 1.0f/60.0f // Time elapsed since last frame, in seconds.
|
||||
float IniSavingRate; // = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
|
||||
const char* IniFilename; // = "imgui.ini" // Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
|
||||
@ -1101,12 +1101,13 @@ struct ImGuiIO
|
||||
bool FontAllowUserScaling; // = false // Allow user scaling text of individual window with CTRL+Wheel.
|
||||
ImFont* FontDefault; // = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
|
||||
ImVec2 DisplayFramebufferScale; // = (1.0f,1.0f) // For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
|
||||
ImVec2 DisplayVisibleMin; // <unset> (0.0f,0.0f) // If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area.
|
||||
ImVec2 DisplayVisibleMax; // <unset> (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize
|
||||
ImVec2 DisplayVisibleMin; // <unset> (0.0f,0.0f) // [obsolete] If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area.
|
||||
ImVec2 DisplayVisibleMax; // <unset> (0.0f,0.0f) // [obsolete: just use io.DisplaySize] If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize
|
||||
|
||||
// Miscellaneous configuration options
|
||||
bool MouseDrawCursor; // = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
|
||||
bool ConfigMacOSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63)
|
||||
bool ConfigCursorBlink; // = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
|
||||
bool ConfigInputTextCursorBlink; // = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
|
||||
bool ConfigResizeWindowsFromEdges; // = false // [BETA] Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be the ImGuiWindowFlags_ResizeFromAnySide flag)
|
||||
|
||||
//------------------------------------------------------------------
|
||||
@ -1141,7 +1142,6 @@ struct ImGuiIO
|
||||
bool MouseDown[5]; // Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
|
||||
float MouseWheel; // Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
|
||||
float MouseWheelH; // Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends.
|
||||
bool MouseDrawCursor; // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
|
||||
bool KeyCtrl; // Keyboard modifier pressed: Control
|
||||
bool KeyShift; // Keyboard modifier pressed: Shift
|
||||
bool KeyAlt; // Keyboard modifier pressed: Alt
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.64
|
||||
// dear imgui, v1.65
|
||||
// (demo code)
|
||||
|
||||
// Message to the person tempted to delete this file when integrating ImGui into their code base:
|
||||
@ -18,6 +18,27 @@
|
||||
// It also happens to be a convenient way of storing simple UI related information as long as your function doesn't need to be reentrant or used in threads.
|
||||
// This might be a pattern you occasionally want to use in your code, but most of the real data you would be editing is likely to be stored outside your functions.
|
||||
|
||||
/*
|
||||
|
||||
Index of this file:
|
||||
|
||||
// [SECTION] Forward Declarations, Helpers
|
||||
// [SECTION] Demo Window / ShowDemoWindow()
|
||||
// [SECTION] Style Editor / ShowStyleEditor()
|
||||
// [SECTION] Example App: Main Menu Bar / ShowExampleAppMainMenuBar()
|
||||
// [SECTION] Example App: Debug Console / ShowExampleAppConsole()
|
||||
// [SECTION] Example App: Debug Log / ShowExampleAppLog()
|
||||
// [SECTION] Example App: Simple Layout / ShowExampleAppLayout()
|
||||
// [SECTION] Example App: Property Editor / ShowExampleAppPropertyEditor()
|
||||
// [SECTION] Example App: Long Text / ShowExampleAppLongText()
|
||||
// [SECTION] Example App: Auto Resize / ShowExampleAppAutoResize()
|
||||
// [SECTION] Example App: Constrained Resize / ShowExampleAppConstrainedResize()
|
||||
// [SECTION] Example App: Simple Overlay / ShowExampleAppSimpleOverlay()
|
||||
// [SECTION] Example App: Manipulating Window Titles / ShowExampleAppWindowTitles()
|
||||
// [SECTION] Example App: Custom Rendering using ImDrawList API / ShowExampleAppCustomRendering()
|
||||
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
@ -67,7 +88,7 @@
|
||||
#define IM_MAX(_A,_B) (((_A) >= (_B)) ? (_A) : (_B))
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DEMO CODE
|
||||
// [SECTION] Forward Declarations, Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && defined(IMGUI_DISABLE_TEST_WINDOWS) && !defined(IMGUI_DISABLE_DEMO_WINDOWS) // Obsolete name since 1.53, TEST->DEMO
|
||||
@ -127,6 +148,10 @@ void ImGui::ShowUserGuide()
|
||||
ImGui::Unindent();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Demo Window / ShowDemoWindow()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate most Dear ImGui features (this is big function!)
|
||||
// You may execute this function to experiment with the UI and understand what it does. You may then search for keywords in the code when you are interested by a specific feature.
|
||||
void ImGui::ShowDemoWindow(bool* p_open)
|
||||
@ -246,11 +271,85 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
ImGui::Spacing();
|
||||
if (ImGui::CollapsingHeader("Help"))
|
||||
{
|
||||
ImGui::TextWrapped("This window is being created by the ShowDemoWindow() function. Please refer to the code in imgui_demo.cpp for reference.\n\n");
|
||||
ImGui::Text("PROGRAMMER GUIDE:");
|
||||
ImGui::BulletText("Please see the ShowDemoWindow() code in imgui_demo.cpp. <- you are here!");
|
||||
ImGui::BulletText("Please see the comments in imgui.cpp.");
|
||||
ImGui::BulletText("Please see the examples/ in application.");
|
||||
ImGui::BulletText("Enable 'io.ConfigFlags |= NavEnableKeyboard' for keyboard controls.");
|
||||
ImGui::BulletText("Enable 'io.ConfigFlags |= NavEnableGamepad' for gamepad controls.");
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("USER GUIDE:");
|
||||
ImGui::ShowUserGuide();
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Configuration"))
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
if (ImGui::TreeNode("Configuration##2"))
|
||||
{
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableKeyboard", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableKeyboard);
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableGamepad", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableGamepad);
|
||||
ImGui::SameLine(); ShowHelpMarker("Required back-end to feed in gamepad inputs in io.NavInputs[] and set io.BackendFlags |= ImGuiBackendFlags_HasGamepad.\n\nRead instructions in imgui.cpp for details.");
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableSetMousePos", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableSetMousePos);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct navigation to move the mouse cursor. See comment for ImGuiConfigFlags_NavEnableSetMousePos.");
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NoMouse", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NoMouse);
|
||||
if (io.ConfigFlags & ImGuiConfigFlags_NoMouse) // Create a way to restore this flag otherwise we could be stuck completely!
|
||||
{
|
||||
if (fmodf((float)ImGui::GetTime(), 0.40f) < 0.20f)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("<<PRESS SPACE TO DISABLE>>");
|
||||
}
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Space)))
|
||||
io.ConfigFlags &= ~ImGuiConfigFlags_NoMouse;
|
||||
}
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct back-end to not alter mouse cursor shape and visibility.");
|
||||
ImGui::Checkbox("io.ConfigInputTextCursorBlink", &io.ConfigInputTextCursorBlink);
|
||||
ImGui::SameLine(); ShowHelpMarker("Set to false to disable blinking cursor, for users who consider it distracting");
|
||||
ImGui::Checkbox("io.ConfigResizeWindowsFromEdges [beta]", &io.ConfigResizeWindowsFromEdges);
|
||||
ImGui::SameLine(); ShowHelpMarker("Enable resizing of windows from their edges and from the lower-left corner.\nThis requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback.");
|
||||
ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct Dear ImGui to render a mouse cursor for you. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something).");
|
||||
ImGui::TreePop();
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Backend Flags"))
|
||||
{
|
||||
ImGuiBackendFlags backend_flags = io.BackendFlags; // Make a local copy to avoid modifying the back-end flags.
|
||||
ImGui::CheckboxFlags("io.BackendFlags: HasGamepad", (unsigned int *)&backend_flags, ImGuiBackendFlags_HasGamepad);
|
||||
ImGui::CheckboxFlags("io.BackendFlags: HasMouseCursors", (unsigned int *)&backend_flags, ImGuiBackendFlags_HasMouseCursors);
|
||||
ImGui::CheckboxFlags("io.BackendFlags: HasSetMousePos", (unsigned int *)&backend_flags, ImGuiBackendFlags_HasSetMousePos);
|
||||
ImGui::TreePop();
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Style"))
|
||||
{
|
||||
ImGui::ShowStyleEditor();
|
||||
ImGui::TreePop();
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Capture/Logging"))
|
||||
{
|
||||
ImGui::TextWrapped("The logging API redirects all text output so you can easily capture the content of a window or a block. Tree nodes can be automatically expanded.");
|
||||
ShowHelpMarker("Try opening any of the contents below in this window and then click one of the \"Log To\" button.");
|
||||
ImGui::LogButtons();
|
||||
ImGui::TextWrapped("You can also call ImGui::LogText() to output directly to the log without a visual output.");
|
||||
if (ImGui::Button("Copy \"Hello, world!\" to clipboard"))
|
||||
{
|
||||
ImGui::LogToClipboard();
|
||||
ImGui::LogText("Hello, world!");
|
||||
ImGui::LogFinish();
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Window options"))
|
||||
{
|
||||
ImGui::Checkbox("No titlebar", &no_titlebar); ImGui::SameLine(150);
|
||||
@ -261,19 +360,6 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
ImGui::Checkbox("No collapse", &no_collapse);
|
||||
ImGui::Checkbox("No close", &no_close); ImGui::SameLine(150);
|
||||
ImGui::Checkbox("No nav", &no_nav);
|
||||
|
||||
if (ImGui::TreeNode("Style"))
|
||||
{
|
||||
ImGui::ShowStyleEditor();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Capture/Logging"))
|
||||
{
|
||||
ImGui::TextWrapped("The logging API redirects all text output so you can easily capture the content of a window or a block. Tree nodes can be automatically expanded. You can also call ImGui::LogText() to output directly to the log without a visual output.");
|
||||
ImGui::LogButtons();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Widgets"))
|
||||
@ -2165,20 +2251,6 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
ImGui::Text("WantSetMousePos: %d", io.WantSetMousePos);
|
||||
ImGui::Text("NavActive: %d, NavVisible: %d", io.NavActive, io.NavVisible);
|
||||
|
||||
ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct ImGui to render a mouse cursor for you in software. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something).");
|
||||
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableGamepad [beta]", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableGamepad);
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableKeyboard [beta]", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableKeyboard);
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableSetMousePos", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NavEnableSetMousePos);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct navigation to move the mouse cursor. See comment for ImGuiConfigFlags_NavEnableSetMousePos.");
|
||||
ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", (unsigned int *)&io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange);
|
||||
ImGui::SameLine(); ShowHelpMarker("Instruct back-end to not alter mouse cursor shape and visibility.");
|
||||
ImGui::Checkbox("io.ConfigCursorBlink", &io.ConfigCursorBlink);
|
||||
ImGui::SameLine(); ShowHelpMarker("Set to false to disable blinking cursor, for users who consider it distracting");
|
||||
ImGui::Checkbox("io.ConfigResizeWindowsFromEdges [beta]", &io.ConfigResizeWindowsFromEdges);
|
||||
ImGui::SameLine(); ShowHelpMarker("Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback.");
|
||||
|
||||
if (ImGui::TreeNode("Keyboard, Mouse & Navigation State"))
|
||||
{
|
||||
if (ImGui::IsMousePosValid())
|
||||
@ -2316,6 +2388,10 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Style Editor / ShowStyleEditor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options.
|
||||
// Here we use the simplified Combo() api that packs items into a single literal string. Useful for quick combo boxes where the choices are known locally.
|
||||
bool ImGui::ShowStyleSelector(const char* label)
|
||||
@ -2579,7 +2655,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: MAIN MENU BAR
|
||||
// [SECTION] Example App: Main Menu Bar / ShowExampleAppMainMenuBar()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate creating a fullscreen menu bar and populating it.
|
||||
@ -2672,10 +2748,10 @@ static void ShowExampleMenuFile()
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: CONSOLE
|
||||
// [SECTION] Example App: Debug Console / ShowExampleAppConsole()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrating creating a simple console window, with scrolling, filtering, completion and history.
|
||||
// Demonstrate creating a simple console window, with scrolling, filtering, completion and history.
|
||||
// For the console example, here we are using a more C++ like approach of declaring a class to hold the data and the functions.
|
||||
struct ExampleAppConsole
|
||||
{
|
||||
@ -2985,7 +3061,7 @@ static void ShowExampleAppConsole(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: LOG
|
||||
// [SECTION] Example App: Debug Log / ShowExampleAppLog()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Usage:
|
||||
@ -3075,7 +3151,7 @@ static void ShowExampleAppLog(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: SIMPLE LAYOUT
|
||||
// [SECTION] Example App: Simple Layout / ShowExampleAppLayout()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate create a window with multiple child windows.
|
||||
@ -3123,7 +3199,7 @@ static void ShowExampleAppLayout(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: PROPERTY EDITOR
|
||||
// [SECTION] Example App: Property Editor / ShowExampleAppPropertyEditor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate create a simple property editor.
|
||||
@ -3196,7 +3272,7 @@ static void ShowExampleAppPropertyEditor(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: LONG TEXT
|
||||
// [SECTION] Example App: Long Text / ShowExampleAppLongText()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate/test rendering huge amount of text, and the incidence of clipping.
|
||||
@ -3254,7 +3330,7 @@ static void ShowExampleAppLongText(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: AUTO RESIZE
|
||||
// [SECTION] Example App: Auto Resize / ShowExampleAppAutoResize()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate creating a window which gets auto-resized according to its content.
|
||||
@ -3275,7 +3351,7 @@ static void ShowExampleAppAutoResize(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: CONSTRAINED RESIZE
|
||||
// [SECTION] Example App: Constrained Resize / ShowExampleAppConstrainedResize()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate creating a window with custom resize constraints.
|
||||
@ -3326,7 +3402,7 @@ static void ShowExampleAppConstrainedResize(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: SIMPLE OVERLAY
|
||||
// [SECTION] Example App: Simple Overlay / ShowExampleAppSimpleOverlay()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate creating a simple static window with no decoration + a context-menu to choose which corner of the screen to use.
|
||||
@ -3362,7 +3438,7 @@ static void ShowExampleAppSimpleOverlay(bool* p_open)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: WINDOW TITLES
|
||||
// [SECTION] Example App: Manipulating Window Titles / ShowExampleAppWindowTitles()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate using "##" and "###" in identifiers to manipulate ID generation.
|
||||
@ -3393,7 +3469,7 @@ static void ShowExampleAppWindowTitles(bool*)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EXAMPLE APP CODE: CUSTOM RENDERING
|
||||
// [SECTION] Example App: Custom Rendering using ImDrawList API / ShowExampleAppCustomRendering()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Demonstrate using the low-level ImDrawList to draw custom shapes.
|
||||
|
@ -1,19 +1,22 @@
|
||||
// dear imgui, v1.64
|
||||
// dear imgui, v1.65
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
|
||||
Index of this file:
|
||||
- Cruft for stb_truetype/stb_rectpack implementation
|
||||
- Style functions (default style)
|
||||
- ImDrawList
|
||||
- ImDrawData
|
||||
- ShadeVertsXXX helpers functions
|
||||
- ImFontConfig
|
||||
- ImFontAtlas
|
||||
- ImFont
|
||||
- Internal Render Helpers
|
||||
- Default font data
|
||||
|
||||
// [SECTION] STB libraries implementation
|
||||
// [SECTION] Style functions
|
||||
// [SECTION] ImDrawList
|
||||
// [SECTION] ImDrawData
|
||||
// [SECTION] Helpers ShadeVertsXXX functions
|
||||
// [SECTION] ImFontConfig
|
||||
// [SECTION] ImFontAtlas
|
||||
// [SECTION] ImFontAtlas glyph ranges helpers + GlyphRangesBuilder
|
||||
// [SECTION] ImFont
|
||||
// [SECTION] Internal Render Helpers
|
||||
// [SECTION] Decompression code
|
||||
// [SECTION] Default font data (ProggyClean.ttf)
|
||||
|
||||
*/
|
||||
|
||||
@ -72,7 +75,7 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// STB libraries implementation
|
||||
// [SECTION] STB libraries implementation
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// Compile time options:
|
||||
@ -116,7 +119,7 @@ namespace IMGUI_STB_NAMESPACE
|
||||
#ifdef IMGUI_STB_RECT_PACK_FILENAME
|
||||
#include IMGUI_STB_RECT_PACK_FILENAME
|
||||
#else
|
||||
#include "stb_rect_pack.h"
|
||||
#include "imstb_rectpack.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -139,7 +142,7 @@ namespace IMGUI_STB_NAMESPACE
|
||||
#ifdef IMGUI_STB_TRUETYPE_FILENAME
|
||||
#include IMGUI_STB_TRUETYPE_FILENAME
|
||||
#else
|
||||
#include "stb_truetype.h"
|
||||
#include "imstb_truetype.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -161,7 +164,7 @@ using namespace IMGUI_STB_NAMESPACE;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Style functions
|
||||
// [SECTION] Style functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ImGui::StyleColorsDark(ImGuiStyle* dst)
|
||||
@ -316,7 +319,7 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImDrawListData
|
||||
// ImDrawList
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ImDrawListSharedData::ImDrawListSharedData()
|
||||
@ -334,10 +337,6 @@ ImDrawListSharedData::ImDrawListSharedData()
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImDrawList
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ImDrawList::Clear()
|
||||
{
|
||||
CmdBuffer.resize(0);
|
||||
@ -1227,7 +1226,7 @@ void ImDrawList::AddImageRounded(ImTextureID user_texture_id, const ImVec2& a, c
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImDrawData
|
||||
// [SECTION] ImDrawData
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
|
||||
@ -1264,7 +1263,7 @@ void ImDrawData::ScaleClipRects(const ImVec2& scale)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Shade functions
|
||||
// [SECTION] Helpers ShadeVertsXXX functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Generic linear color gradient, write to RGB fields, leave A untouched.
|
||||
@ -1311,7 +1310,7 @@ void ImGui::ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int ve
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImFontConfig
|
||||
// [SECTION] ImFontConfig
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ImFontConfig::ImFontConfig()
|
||||
@ -1337,7 +1336,7 @@ ImFontConfig::ImFontConfig()
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImFontAtlas
|
||||
// [SECTION] ImFontAtlas
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
||||
@ -2074,6 +2073,10 @@ static void UnpackAccumulativeOffsetsIntoRanges(int base_codepoint, const short*
|
||||
out_ranges[0] = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// [SECTION] ImFontAtlas glyph ranges helpers + GlyphRangesBuilder
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon()
|
||||
{
|
||||
// Store 2500 regularly used characters for Simplified Chinese.
|
||||
@ -2223,10 +2226,6 @@ const ImWchar* ImFontAtlas::GetGlyphRangesThai()
|
||||
return &ranges[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImFontAtlas::GlyphRangesBuilder
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ImFontAtlas::GlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
||||
{
|
||||
while (text_end ? (text < text_end) : *text)
|
||||
@ -2262,7 +2261,7 @@ void ImFontAtlas::GlyphRangesBuilder::BuildRanges(ImVector<ImWchar>* out_ranges)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ImFont
|
||||
// [SECTION] ImFont
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ImFont::ImFont()
|
||||
@ -2813,12 +2812,12 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Internals Render Helpers
|
||||
// [SECTION] Internal Render Helpers
|
||||
// (progressively moved from imgui.cpp to here when they are redesigned to stop accessing ImGui global state)
|
||||
//-----------------------------------------------------------------------------
|
||||
// RenderMouseCursor()
|
||||
// RenderArrowPointingAt()
|
||||
// RenderRectFilledRangeH()
|
||||
// - RenderMouseCursor()
|
||||
// - RenderArrowPointingAt()
|
||||
// - RenderRectFilledRangeH()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ImGui::RenderMouseCursor(ImDrawList* draw_list, ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor)
|
||||
@ -2927,8 +2926,9 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im
|
||||
draw_list->PathFillConvex(col);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DEFAULT FONT DATA
|
||||
// [SECTION] Decompression code
|
||||
//-----------------------------------------------------------------------------
|
||||
// Compressed with stb_compress() then converted to a C array and encoded as base85.
|
||||
// Use the program in misc/fonts/binary_to_compressed_c.cpp to create the array from a TTF file.
|
||||
@ -3047,6 +3047,8 @@ static unsigned int stb_decompress(unsigned char *output, const unsigned char *i
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Default font data (ProggyClean.ttf)
|
||||
//-----------------------------------------------------------------------------
|
||||
// ProggyClean.ttf
|
||||
// Copyright (c) 2004, 2005 Tristan Grimmer
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.64
|
||||
// dear imgui, v1.65
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
@ -76,7 +76,7 @@ namespace ImGuiStb
|
||||
#define STB_TEXTEDIT_STRING ImGuiInputTextState
|
||||
#define STB_TEXTEDIT_CHARTYPE ImWchar
|
||||
#define STB_TEXTEDIT_GETWIDTH_NEWLINE -1.0f
|
||||
#include "stb_textedit.h"
|
||||
#include "imstb_textedit.h"
|
||||
|
||||
} // namespace ImGuiStb
|
||||
|
||||
@ -132,6 +132,7 @@ IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, con
|
||||
IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
|
||||
IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
|
||||
IMGUI_API void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w);
|
||||
IMGUI_API ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy);
|
||||
|
||||
// Helpers: String
|
||||
IMGUI_API int ImStricmp(const char* str1, const char* str2);
|
||||
@ -1015,9 +1016,9 @@ struct IMGUI_API ImGuiWindow
|
||||
bool Appearing; // Set during the frame where the window is appearing (or re-appearing)
|
||||
bool Hidden; // Do not display (== (HiddenFramesForResize > 0) ||
|
||||
bool HasCloseButton; // Set when the window has a close button (p_open != NULL)
|
||||
int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
|
||||
int BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
|
||||
int BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues.
|
||||
int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
|
||||
ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
|
||||
int AutoFitFramesX, AutoFitFramesY;
|
||||
bool AutoFitOnlyGrows;
|
||||
@ -1246,13 +1247,24 @@ namespace ImGui
|
||||
IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextTreeNodeOpened() data, if any. May return true when logging
|
||||
IMGUI_API void TreePushRawID(ImGuiID id);
|
||||
|
||||
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
|
||||
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
|
||||
// e.g. " extern template IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v); "
|
||||
template<typename T, typename SIGNED_T, typename FLOAT_T> IMGUI_API bool DragBehaviorT(ImGuiDataType data_type, T* v, float v_speed, const T v_min, const T v_max, const char* format, float power);
|
||||
template<typename T, typename SIGNED_T, typename FLOAT_T> IMGUI_API bool SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, T* v, const T v_min, const T v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb);
|
||||
template<typename T, typename FLOAT_T> IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max, float power, float linear_zero_pos);
|
||||
template<typename T, typename SIGNED_T> IMGUI_API T RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, T v);
|
||||
|
||||
// InputText
|
||||
IMGUI_API bool InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
IMGUI_API bool InputScalarAsWidgetReplacement(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* data_ptr, const char* format);
|
||||
|
||||
// Color
|
||||
IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags);
|
||||
IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags);
|
||||
IMGUI_API void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags);
|
||||
|
||||
// Plot
|
||||
IMGUI_API void PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size);
|
||||
|
||||
// Shade functions (write over already created vertices)
|
||||
|
@ -1,24 +1,27 @@
|
||||
// dear imgui, v1.64
|
||||
// dear imgui, v1.65
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
||||
Index of this file:
|
||||
- Widgets: Text, etc.
|
||||
- Widgets: Button, Image, Checkbox, RadioButton, ProgressBar, Bullet, etc.
|
||||
- Widgets: ComboBox
|
||||
- Data Type and Data Formatting Helpers
|
||||
- Widgets: DragScalar, DragFloat, DragInt, etc.
|
||||
- Widgets: SliderScalar, SliderFloat, SliderInt, etc.
|
||||
- Widgets: InputScalar, InputFloat, InputInt, etc.
|
||||
- Widgets: InputText, InputTextMultiline
|
||||
- Widgets: ColorEdit, ColorPicker, ColorButton, etc.
|
||||
- Widgets: TreeNode, TreePush, TreePop, etc.
|
||||
- Widgets: Selectable
|
||||
- Widgets: ListBox
|
||||
- Widgets: PlotLines, PlotHistogram
|
||||
- Widgets: Value
|
||||
- Widgets: MenuItem, BeginMenu, EndMenu, etc.
|
||||
|
||||
// [SECTION] Forward Declarations
|
||||
// [SECTION] Widgets: Text, etc.
|
||||
// [SECTION] Widgets: Main (Button, Image, Checkbox, RadioButton, ProgressBar, Bullet, etc.)
|
||||
// [SECTION] Widgets: Low-level Layout helpers (Spacing, Dummy, NewLine, Separator, etc.)
|
||||
// [SECTION] Widgets: ComboBox
|
||||
// [SECTION] Data Type and Data Formatting Helpers
|
||||
// [SECTION] Widgets: DragScalar, DragFloat, DragInt, etc.
|
||||
// [SECTION] Widgets: SliderScalar, SliderFloat, SliderInt, etc.
|
||||
// [SECTION] Widgets: InputScalar, InputFloat, InputInt, etc.
|
||||
// [SECTION] Widgets: InputText, InputTextMultiline
|
||||
// [SECTION] Widgets: ColorEdit, ColorPicker, ColorButton, etc.
|
||||
// [SECTION] Widgets: TreeNode, CollapsingHeader, etc.
|
||||
// [SECTION] Widgets: Selectable
|
||||
// [SECTION] Widgets: ListBox
|
||||
// [SECTION] Widgets: PlotLines, PlotHistogram
|
||||
// [SECTION] Widgets: Value helpers
|
||||
// [SECTION] Widgets: MenuItem, BeginMenu, EndMenu, etc.
|
||||
|
||||
*/
|
||||
|
||||
@ -80,7 +83,7 @@ static const ImU64 IM_U64_MAX = (2ULL * 9223372036854775807LL + 1);
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
// [SECTION] Forward Declarations
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// Data Type helpers
|
||||
@ -93,20 +96,9 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInpu
|
||||
static int InputTextCalcTextLenAndLineCount(const char* text_begin, const char** out_text_end);
|
||||
static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const ImWchar* text_end, const ImWchar** remaining = NULL, ImVec2* out_offset = NULL, bool stop_on_new_line = false);
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
|
||||
// Template widget behaviors
|
||||
template<typename TYPE, typename SIGNEDTYPE, typename FLOATTYPE>
|
||||
static bool DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const TYPE v_min, const TYPE v_max, const char* format, float power);
|
||||
|
||||
template<typename TYPE, typename SIGNEDTYPE, typename FLOATTYPE>
|
||||
static bool SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, TYPE* v, const TYPE v_min, const TYPE v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb);
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Text
|
||||
// [SECTION] Widgets: Text, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - TextUnformatted()
|
||||
// - Text()
|
||||
// - TextV()
|
||||
@ -361,7 +353,8 @@ void ImGui::BulletTextV(const char* fmt, va_list args)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Main
|
||||
// [SECTION] Widgets: Main
|
||||
//-------------------------------------------------------------------------
|
||||
// - ButtonBehavior() [Internal]
|
||||
// - Button()
|
||||
// - SmallButton()
|
||||
@ -1064,7 +1057,191 @@ void ImGui::Bullet()
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Combo Box
|
||||
// [SECTION] Widgets: Low-level Layout helpers
|
||||
//-------------------------------------------------------------------------
|
||||
// - Spacing()
|
||||
// - Dummy()
|
||||
// - NewLine()
|
||||
// - AlignTextToFramePadding()
|
||||
// - Separator()
|
||||
// - VerticalSeparator() [Internal]
|
||||
// - SplitterBehavior() [Internal]
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
void ImGui::Spacing()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
ItemSize(ImVec2(0,0));
|
||||
}
|
||||
|
||||
void ImGui::Dummy(const ImVec2& size)
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
|
||||
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
|
||||
ItemSize(bb);
|
||||
ItemAdd(bb, 0);
|
||||
}
|
||||
|
||||
void ImGui::NewLine()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
|
||||
ImGuiContext& g = *GImGui;
|
||||
const ImGuiLayoutType backup_layout_type = window->DC.LayoutType;
|
||||
window->DC.LayoutType = ImGuiLayoutType_Vertical;
|
||||
if (window->DC.CurrentLineSize.y > 0.0f) // In the event that we are on a line with items that is smaller that FontSize high, we will preserve its height.
|
||||
ItemSize(ImVec2(0,0));
|
||||
else
|
||||
ItemSize(ImVec2(0.0f, g.FontSize));
|
||||
window->DC.LayoutType = backup_layout_type;
|
||||
}
|
||||
|
||||
void ImGui::AlignTextToFramePadding()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
|
||||
ImGuiContext& g = *GImGui;
|
||||
window->DC.CurrentLineSize.y = ImMax(window->DC.CurrentLineSize.y, g.FontSize + g.Style.FramePadding.y * 2);
|
||||
window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.CurrentLineTextBaseOffset, g.Style.FramePadding.y);
|
||||
}
|
||||
|
||||
// Horizontal/vertical separating line
|
||||
void ImGui::Separator()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
// Those flags should eventually be overridable by the user
|
||||
ImGuiSeparatorFlags flags = (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal;
|
||||
IM_ASSERT(ImIsPowerOfTwo((int)(flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)))); // Check that only 1 option is selected
|
||||
if (flags & ImGuiSeparatorFlags_Vertical)
|
||||
{
|
||||
VerticalSeparator();
|
||||
return;
|
||||
}
|
||||
|
||||
// Horizontal Separator
|
||||
if (window->DC.ColumnsSet)
|
||||
PopClipRect();
|
||||
|
||||
float x1 = window->Pos.x;
|
||||
float x2 = window->Pos.x + window->Size.x;
|
||||
if (!window->DC.GroupStack.empty())
|
||||
x1 += window->DC.Indent.x;
|
||||
|
||||
const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f));
|
||||
ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit, we don't provide height to not alter layout.
|
||||
if (!ItemAdd(bb, 0))
|
||||
{
|
||||
if (window->DC.ColumnsSet)
|
||||
PushColumnClipRect();
|
||||
return;
|
||||
}
|
||||
|
||||
window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Separator));
|
||||
|
||||
if (g.LogEnabled)
|
||||
LogRenderedText(NULL, IM_NEWLINE "--------------------------------");
|
||||
|
||||
if (window->DC.ColumnsSet)
|
||||
{
|
||||
PushColumnClipRect();
|
||||
window->DC.ColumnsSet->LineMinY = window->DC.CursorPos.y;
|
||||
}
|
||||
}
|
||||
|
||||
void ImGui::VerticalSeparator()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
float y1 = window->DC.CursorPos.y;
|
||||
float y2 = window->DC.CursorPos.y + window->DC.CurrentLineSize.y;
|
||||
const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + 1.0f, y2));
|
||||
ItemSize(ImVec2(bb.GetWidth(), 0.0f));
|
||||
if (!ItemAdd(bb, 0))
|
||||
return;
|
||||
|
||||
window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y), ImVec2(bb.Min.x, bb.Max.y), GetColorU32(ImGuiCol_Separator));
|
||||
if (g.LogEnabled)
|
||||
LogText(" |");
|
||||
}
|
||||
|
||||
// Using 'hover_visibility_delay' allows us to hide the highlight and mouse cursor for a short time, which can be convenient to reduce visual noise.
|
||||
bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend, float hover_visibility_delay)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
|
||||
const ImGuiItemFlags item_flags_backup = window->DC.ItemFlags;
|
||||
window->DC.ItemFlags |= ImGuiItemFlags_NoNav | ImGuiItemFlags_NoNavDefaultFocus;
|
||||
bool item_add = ItemAdd(bb, id);
|
||||
window->DC.ItemFlags = item_flags_backup;
|
||||
if (!item_add)
|
||||
return false;
|
||||
|
||||
bool hovered, held;
|
||||
ImRect bb_interact = bb;
|
||||
bb_interact.Expand(axis == ImGuiAxis_Y ? ImVec2(0.0f, hover_extend) : ImVec2(hover_extend, 0.0f));
|
||||
ButtonBehavior(bb_interact, id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap);
|
||||
if (g.ActiveId != id)
|
||||
SetItemAllowOverlap();
|
||||
|
||||
if (held || (g.HoveredId == id && g.HoveredIdPreviousFrame == id && g.HoveredIdTimer >= hover_visibility_delay))
|
||||
SetMouseCursor(axis == ImGuiAxis_Y ? ImGuiMouseCursor_ResizeNS : ImGuiMouseCursor_ResizeEW);
|
||||
|
||||
ImRect bb_render = bb;
|
||||
if (held)
|
||||
{
|
||||
ImVec2 mouse_delta_2d = g.IO.MousePos - g.ActiveIdClickOffset - bb_interact.Min;
|
||||
float mouse_delta = (axis == ImGuiAxis_Y) ? mouse_delta_2d.y : mouse_delta_2d.x;
|
||||
|
||||
// Minimum pane size
|
||||
float size_1_maximum_delta = ImMax(0.0f, *size1 - min_size1);
|
||||
float size_2_maximum_delta = ImMax(0.0f, *size2 - min_size2);
|
||||
if (mouse_delta < -size_1_maximum_delta)
|
||||
mouse_delta = -size_1_maximum_delta;
|
||||
if (mouse_delta > size_2_maximum_delta)
|
||||
mouse_delta = size_2_maximum_delta;
|
||||
|
||||
// Apply resize
|
||||
if (mouse_delta != 0.0f)
|
||||
{
|
||||
if (mouse_delta < 0.0f)
|
||||
IM_ASSERT(*size1 + mouse_delta >= min_size1);
|
||||
if (mouse_delta > 0.0f)
|
||||
IM_ASSERT(*size2 - mouse_delta >= min_size2);
|
||||
*size1 += mouse_delta;
|
||||
*size2 -= mouse_delta;
|
||||
bb_render.Translate((axis == ImGuiAxis_X) ? ImVec2(mouse_delta, 0.0f) : ImVec2(0.0f, mouse_delta));
|
||||
MarkItemEdited(id);
|
||||
}
|
||||
}
|
||||
|
||||
// Render
|
||||
const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : (hovered && g.HoveredIdTimer >= hover_visibility_delay) ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
|
||||
window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, g.Style.FrameRounding);
|
||||
|
||||
return held;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// [SECTION] Widgets: Combo Box
|
||||
//-------------------------------------------------------------------------
|
||||
// - BeginCombo()
|
||||
// - EndCombo()
|
||||
// - Combo()
|
||||
@ -1278,7 +1455,8 @@ bool ImGui::Combo(const char* label, int* current_item, const char* items_separa
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Data Type and Data Formatting Helpers [Internal]
|
||||
// [SECTION] Data Type and Data Formatting Helpers [Internal]
|
||||
//-------------------------------------------------------------------------
|
||||
// - PatchFormatStringFloatToInt()
|
||||
// - DataTypeFormatString()
|
||||
// - DataTypeApplyOp()
|
||||
@ -1489,7 +1667,7 @@ static const char* ImAtoi(const char* src, TYPE* output)
|
||||
}
|
||||
|
||||
template<typename TYPE, typename SIGNEDTYPE>
|
||||
static inline TYPE RoundScalarWithFormat(const char* format, ImGuiDataType data_type, TYPE v)
|
||||
TYPE ImGui::RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, TYPE v)
|
||||
{
|
||||
const char* fmt_start = ImParseFormatFindStart(format);
|
||||
if (fmt_start[0] != '%' || fmt_start[1] == '%') // Don't apply if the value is not visible in the format string
|
||||
@ -1507,7 +1685,8 @@ static inline TYPE RoundScalarWithFormat(const char* format, ImGuiDataType data_
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Drags
|
||||
// [SECTION] Widgets: DragScalar, DragFloat, DragInt, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - DragBehaviorT<>() [Internal]
|
||||
// - DragBehavior() [Internal]
|
||||
// - DragScalar()
|
||||
@ -1526,7 +1705,7 @@ static inline TYPE RoundScalarWithFormat(const char* format, ImGuiDataType data_
|
||||
|
||||
// This is called by DragBehavior() when the widget is active (held by mouse or being manipulated with Nav controls)
|
||||
template<typename TYPE, typename SIGNEDTYPE, typename FLOATTYPE>
|
||||
static bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const TYPE v_min, const TYPE v_max, const char* format, float power)
|
||||
bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const TYPE v_min, const TYPE v_max, const char* format, float power)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
@ -1589,7 +1768,7 @@ static bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed
|
||||
}
|
||||
|
||||
// Round to user desired precision based on format string
|
||||
v_cur = RoundScalarWithFormat<TYPE, SIGNEDTYPE>(format, data_type, v_cur);
|
||||
v_cur = RoundScalarWithFormatT<TYPE, SIGNEDTYPE>(format, data_type, v_cur);
|
||||
|
||||
// Preserve remainder after rounding has been applied. This also allow slow tweaking of values.
|
||||
g.DragCurrentAccumDirty = false;
|
||||
@ -1844,7 +2023,8 @@ bool ImGui::DragIntRange2(const char* label, int* v_current_min, int* v_current_
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Sliders
|
||||
// [SECTION] Widgets: SliderScalar, SliderFloat, SliderInt, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - SliderBehaviorT<>() [Internal]
|
||||
// - SliderBehavior() [Internal]
|
||||
// - SliderScalar()
|
||||
@ -1864,7 +2044,7 @@ bool ImGui::DragIntRange2(const char* label, int* v_current_min, int* v_current_
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
template<typename TYPE, typename FLOATTYPE>
|
||||
static inline float SliderBehaviorCalcRatioFromValue(ImGuiDataType data_type, TYPE v, TYPE v_min, TYPE v_max, float power, float linear_zero_pos)
|
||||
float ImGui::SliderCalcRatioFromValueT(ImGuiDataType data_type, TYPE v, TYPE v_min, TYPE v_max, float power, float linear_zero_pos)
|
||||
{
|
||||
if (v_min == v_max)
|
||||
return 0.0f;
|
||||
@ -1891,7 +2071,7 @@ static inline float SliderBehaviorCalcRatioFromValue(ImGuiDataType data_type, TY
|
||||
|
||||
// FIXME: Move some of the code into SliderBehavior(). Current responsability is larger than what the equivalent DragBehaviorT<> does, we also do some rendering, etc.
|
||||
template<typename TYPE, typename SIGNEDTYPE, typename FLOATTYPE>
|
||||
static bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, TYPE* v, const TYPE v_min, const TYPE v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb)
|
||||
bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, TYPE* v, const TYPE v_min, const TYPE v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
const ImGuiStyle& style = g.Style;
|
||||
@ -1957,7 +2137,7 @@ static bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType d
|
||||
}
|
||||
else if (delta != 0.0f)
|
||||
{
|
||||
clicked_t = SliderBehaviorCalcRatioFromValue<TYPE,FLOATTYPE>(data_type, *v, v_min, v_max, power, linear_zero_pos);
|
||||
clicked_t = SliderCalcRatioFromValueT<TYPE,FLOATTYPE>(data_type, *v, v_min, v_max, power, linear_zero_pos);
|
||||
const int decimal_precision = is_decimal ? ImParseFormatPrecision(format, 3) : 0;
|
||||
if ((decimal_precision > 0) || is_power)
|
||||
{
|
||||
@ -2029,7 +2209,7 @@ static bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType d
|
||||
}
|
||||
|
||||
// Round to user desired precision based on format string
|
||||
v_new = RoundScalarWithFormat<TYPE,SIGNEDTYPE>(format, data_type, v_new);
|
||||
v_new = RoundScalarWithFormatT<TYPE,SIGNEDTYPE>(format, data_type, v_new);
|
||||
|
||||
// Apply result
|
||||
if (*v != v_new)
|
||||
@ -2041,7 +2221,7 @@ static bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType d
|
||||
}
|
||||
|
||||
// Output grab position so it can be displayed by the caller
|
||||
float grab_t = SliderBehaviorCalcRatioFromValue<TYPE,FLOATTYPE>(data_type, *v, v_min, v_max, power, linear_zero_pos);
|
||||
float grab_t = SliderCalcRatioFromValueT<TYPE,FLOATTYPE>(data_type, *v, v_min, v_max, power, linear_zero_pos);
|
||||
if (!is_horizontal)
|
||||
grab_t = 1.0f - grab_t;
|
||||
const float grab_pos = ImLerp(slider_usable_pos_min, slider_usable_pos_max, grab_t);
|
||||
@ -2308,11 +2488,12 @@ bool ImGui::VSliderInt(const char* label, const ImVec2& size, int* v, int v_min,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Inputs (_excepted InputText_)
|
||||
// - ImParseFormatFindStart()
|
||||
// - ImParseFormatFindEnd()
|
||||
// - ImParseFormatTrimDecorations()
|
||||
// - ImParseFormatPrecision()
|
||||
// [SECTION] Widgets: InputScalar, InputFloat, InputInt, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - ImParseFormatFindStart() [Internal]
|
||||
// - ImParseFormatFindEnd() [Internal]
|
||||
// - ImParseFormatTrimDecorations() [Internal]
|
||||
// - ImParseFormatPrecision() [Internal]
|
||||
// - InputScalarAsWidgetReplacement() [Internal]
|
||||
// - InputScalar()
|
||||
// - InputScalarN()
|
||||
@ -2605,7 +2786,8 @@ bool ImGui::InputDouble(const char* label, double* v, double step, double step_f
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: InputText
|
||||
// [SECTION] Widgets: InputText, InputTextMultiline
|
||||
//-------------------------------------------------------------------------
|
||||
// - InputText()
|
||||
// - InputTextMultiline()
|
||||
// - InputTextEx() [Internal]
|
||||
@ -2778,7 +2960,7 @@ static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const Im
|
||||
#define STB_TEXTEDIT_K_SHIFT 0x20000
|
||||
|
||||
#define STB_TEXTEDIT_IMPLEMENTATION
|
||||
#include "stb_textedit.h"
|
||||
#include "imstb_textedit.h"
|
||||
|
||||
}
|
||||
|
||||
@ -3530,7 +3712,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + buf_display_len, 0.0f, is_multiline ? NULL : &clip_rect);
|
||||
|
||||
// Draw blinking cursor
|
||||
bool cursor_is_visible = (!g.IO.ConfigCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || ImFmod(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
||||
bool cursor_is_visible = (!g.IO.ConfigInputTextCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || ImFmod(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
||||
ImVec2 cursor_screen_pos = render_pos + cursor_offset - render_scroll;
|
||||
ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y-g.FontSize+0.5f, cursor_screen_pos.x+1.0f, cursor_screen_pos.y-1.5f);
|
||||
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect))
|
||||
@ -3579,7 +3761,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Color Editor / Picker
|
||||
// [SECTION] Widgets: ColorEdit, ColorPicker, ColorButton, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - ColorEdit3()
|
||||
// - ColorEdit4()
|
||||
// - ColorPicker3()
|
||||
@ -4379,7 +4562,8 @@ void ImGui::ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags fl
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Trees
|
||||
// [SECTION] Widgets: TreeNode, CollapsingHeader, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - TreeNode()
|
||||
// - TreeNodeV()
|
||||
// - TreeNodeEx()
|
||||
@ -4772,7 +4956,8 @@ bool ImGui::CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Selectables
|
||||
// [SECTION] Widgets: Selectable
|
||||
//-------------------------------------------------------------------------
|
||||
// - Selectable()
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@ -4880,7 +5065,8 @@ bool ImGui::Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: List Box
|
||||
// [SECTION] Widgets: ListBox
|
||||
//-------------------------------------------------------------------------
|
||||
// - ListBox()
|
||||
// - ListBoxHeader()
|
||||
// - ListBoxFooter()
|
||||
@ -4989,7 +5175,8 @@ bool ImGui::ListBox(const char* label, int* current_item, bool (*items_getter)(v
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Data Plotting
|
||||
// [SECTION] Widgets: PlotLines, PlotHistogram
|
||||
//-------------------------------------------------------------------------
|
||||
// - PlotEx() [Internal]
|
||||
// - PlotLines()
|
||||
// - PlotHistogram()
|
||||
@ -5143,7 +5330,9 @@ void ImGui::PlotHistogram(const char* label, float (*values_getter)(void* data,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Value() helpers
|
||||
// [SECTION] Widgets: Value helpers
|
||||
// Those is not very useful, legacy API.
|
||||
//-------------------------------------------------------------------------
|
||||
// - Value()
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@ -5177,8 +5366,9 @@ void ImGui::Value(const char* prefix, float v, const char* float_format)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// WIDGETS: Menus
|
||||
// - ImGuiMenuColumns
|
||||
// [SECTION] MenuItem, BeginMenu, EndMenu, etc.
|
||||
//-------------------------------------------------------------------------
|
||||
// - ImGuiMenuColumns [Internal]
|
||||
// - BeginMainMenuBar()
|
||||
// - EndMainMenuBar()
|
||||
// - BeginMenuBar()
|
||||
@ -5533,4 +5723,3 @@ bool ImGui::MenuItem(const char* label, const char* shortcut, bool* p_selected,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,9 @@
|
||||
<ClInclude Include="..\..\..\imgui\imconfig.h" />
|
||||
<ClInclude Include="..\..\..\imgui\imgui.h" />
|
||||
<ClInclude Include="..\..\..\imgui\imgui_internal.h" />
|
||||
<ClInclude Include="..\..\..\imgui\stb_rect_pack.h" />
|
||||
<ClInclude Include="..\..\..\imgui\stb_textedit.h" />
|
||||
<ClInclude Include="..\..\..\imgui\stb_truetype.h" />
|
||||
<ClInclude Include="..\..\..\imgui\imstb_rectpack.h" />
|
||||
<ClInclude Include="..\..\..\imgui\imstb_textedit.h" />
|
||||
<ClInclude Include="..\..\..\imgui\imstb_truetype.h" />
|
||||
<ClInclude Include="..\..\..\nfd\common.h" />
|
||||
<ClInclude Include="..\..\..\nfd\nfd.h" />
|
||||
<ClInclude Include="..\..\..\nfd\nfd_common.h" />
|
||||
|
@ -42,15 +42,6 @@
|
||||
<ClCompile Include="..\..\src\main.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui_demo.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui_draw.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libs\gl3w\GL\gl3w.c">
|
||||
<Filter>gl3w</Filter>
|
||||
</ClCompile>
|
||||
@ -90,6 +81,15 @@
|
||||
<ClCompile Include="..\..\src\imgui_impl_opengl3.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui_demo.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui_draw.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\imgui\imgui_widgets.cpp">
|
||||
<Filter>imgui</Filter>
|
||||
</ClCompile>
|
||||
@ -122,24 +122,6 @@
|
||||
<ClInclude Include="..\..\..\server\TracyView.hpp">
|
||||
<Filter>server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imconfig.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imgui.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imgui_internal.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\stb_rect_pack.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\stb_textedit.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\stb_truetype.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libs\gl3w\GL\gl3w.h">
|
||||
<Filter>gl3w</Filter>
|
||||
</ClInclude>
|
||||
@ -188,12 +170,6 @@
|
||||
<ClInclude Include="..\..\..\common\TracyAlign.hpp">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\common\tracy_benaphore.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\common\tracy_sema.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\server\TracyFileHeader.hpp">
|
||||
<Filter>server</Filter>
|
||||
</ClInclude>
|
||||
@ -251,6 +227,30 @@
|
||||
<ClInclude Include="..\..\src\imgui_impl_opengl3.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\common\tracy_benaphore.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\common\tracy_sema.h">
|
||||
<Filter>common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imconfig.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imgui.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imgui_internal.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imstb_rectpack.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imstb_textedit.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\imgui\imstb_truetype.h">
|
||||
<Filter>imgui</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="DebugVis.natvis" />
|
||||
|
@ -244,7 +244,7 @@ namespace
|
||||
#define STBRP_ASSERT(x) IM_ASSERT(x)
|
||||
#define STBRP_STATIC
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "stb_rect_pack.h"
|
||||
#include "imstb_rectpack.h"
|
||||
|
||||
bool ImGuiFreeType::BuildFontAtlas(ImFontAtlas* atlas, unsigned int extra_flags)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user