mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Updated ImGui.
This commit is contained in:
9
3rdparty/dear-imgui/imgui.cpp
vendored
9
3rdparty/dear-imgui/imgui.cpp
vendored
@@ -672,8 +672,8 @@ CODE
|
||||
you to animate labels. For example you may want to include varying information in a window title bar,
|
||||
but windows are uniquely identified by their ID. Use "###" to pass a label that isn't part of ID:
|
||||
|
||||
Button("Hello###ID"; // Label = "Hello", ID = hash of (..., "ID")
|
||||
Button("World###ID"; // Label = "World", ID = hash of (..., "ID") // Same as above, even though the label looks different
|
||||
Button("Hello###ID"); // Label = "Hello", ID = hash of (..., "ID")
|
||||
Button("World###ID"); // Label = "World", ID = hash of (..., "ID") // Same as above, even though the label looks different
|
||||
|
||||
sprintf(buf, "My game (%f FPS)###MyGame", fps);
|
||||
Begin(buf); // Variable title, ID = hash of "MyGame"
|
||||
@@ -3303,8 +3303,9 @@ void ImGui::NewFrame()
|
||||
g.CurrentPopupStack.resize(0);
|
||||
ClosePopupsOverWindow(g.NavWindow);
|
||||
|
||||
// Create implicit window - we will only render it if the user has added something to it.
|
||||
// Create implicit/fallback window - which we will only render it if the user has added something to it.
|
||||
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
|
||||
// This fallback is particularly important as it avoid ImGui:: calls from crashing.
|
||||
SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
|
||||
Begin("Debug##Default");
|
||||
|
||||
@@ -4459,7 +4460,7 @@ static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_au
|
||||
ImGuiWindowFlags flags = window->Flags;
|
||||
if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0)
|
||||
return;
|
||||
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit Debug window.
|
||||
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit/fallback Debug window.
|
||||
return;
|
||||
|
||||
const int resize_border_count = g.IO.ConfigResizeWindowsFromEdges ? 4 : 0;
|
||||
|
||||
6
3rdparty/dear-imgui/imgui.h
vendored
6
3rdparty/dear-imgui/imgui.h
vendored
@@ -44,8 +44,8 @@ Index of this file:
|
||||
|
||||
// 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.67 WIP"
|
||||
#define IMGUI_VERSION_NUM 16700
|
||||
#define IMGUI_VERSION "1.66b"
|
||||
#define IMGUI_VERSION_NUM 16602
|
||||
#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)
|
||||
@@ -1904,9 +1904,9 @@ struct ImFontAtlas
|
||||
// Building in RGBA32 format is provided for convenience and compatibility, but note that unless you manually manipulate or copy color data into
|
||||
// the texture (e.g. when using the AddCustomRect*** api), then the RGB pixels emitted will always be white (~75% of memory/bandwidth waste.
|
||||
IMGUI_API bool Build(); // Build pixels data. This is called automatically for you by the GetTexData*** functions.
|
||||
IMGUI_API bool IsBuilt() { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
||||
IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel
|
||||
IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel
|
||||
bool IsBuilt() { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
||||
void SetTexID(ImTextureID id) { TexID = id; }
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
4
3rdparty/dear-imgui/imgui_demo.cpp
vendored
4
3rdparty/dear-imgui/imgui_demo.cpp
vendored
@@ -199,7 +199,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
|
||||
if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); }
|
||||
if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); }
|
||||
if (show_app_about) { ShowAboutWindow(&show_app_about); }
|
||||
if (show_app_about) { ImGui::ShowAboutWindow(&show_app_about); }
|
||||
|
||||
// Demonstrate the various window flags. Typically you would just use the default!
|
||||
static bool no_titlebar = false;
|
||||
@@ -2459,7 +2459,7 @@ static void ShowDemoWindowMisc()
|
||||
void ImGui::ShowAboutWindow(bool* p_open)
|
||||
{
|
||||
ImGui::Begin("About Dear ImGui", p_open, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text("Dear ImGui, %s", ImGui::GetVersion());
|
||||
ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
|
||||
ImGui::Separator();
|
||||
ImGui::Text("By Omar Cornut and all dear imgui contributors.");
|
||||
ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information.");
|
||||
|
||||
Reference in New Issue
Block a user