mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Merge branch 'master' into docking
# Conflicts: # examples/imgui_impl_opengl3.cpp # imgui.cpp # imgui.h
This commit is contained in:
commit
7227454dca
@ -120,6 +120,7 @@ Other Changes:
|
|||||||
- Examples: Win32: Added support for XInput games (if ImGuiConfigFlags_NavEnableGamepad is enabled).
|
- Examples: Win32: Added support for XInput games (if ImGuiConfigFlags_NavEnableGamepad is enabled).
|
||||||
- Examples: Win32: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages. (#2264)
|
- Examples: Win32: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages. (#2264)
|
||||||
- Examples: DirectX9: Explicitly disable fog (D3DRS_FOGENABLE) before drawing in case user state has it set. (#2288, #2230)
|
- Examples: DirectX9: Explicitly disable fog (D3DRS_FOGENABLE) before drawing in case user state has it set. (#2288, #2230)
|
||||||
|
- Examples: OpenGL3: Using GLSL 4.10 shaders for any GLSL version over 410 (e.g. 430, 450). (#2329) [@BrutPitt]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (minor and older changes stripped away, please see git history for details)
|
||||||
// 2018-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
// 2018-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||||
|
// 2019-02-01: OpenGL: Using GLSL 410 shaders for any version over 410 (e.g. 430, 450).
|
||||||
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
|
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
|
||||||
// 2018-11-13: OpenGL: Support for GL 4.5's glClipControl(GL_UPPER_LEFT).
|
// 2018-11-13: OpenGL: Support for GL 4.5's glClipControl(GL_UPPER_LEFT).
|
||||||
// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
|
// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
|
||||||
@ -489,7 +490,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
|
|||||||
vertex_shader = vertex_shader_glsl_120;
|
vertex_shader = vertex_shader_glsl_120;
|
||||||
fragment_shader = fragment_shader_glsl_120;
|
fragment_shader = fragment_shader_glsl_120;
|
||||||
}
|
}
|
||||||
else if (glsl_version == 410)
|
else if (glsl_version >= 410)
|
||||||
{
|
{
|
||||||
vertex_shader = vertex_shader_glsl_410_core;
|
vertex_shader = vertex_shader_glsl_410_core;
|
||||||
fragment_shader = fragment_shader_glsl_410_core;
|
fragment_shader = fragment_shader_glsl_410_core;
|
||||||
|
@ -1005,9 +1005,6 @@ static const float DOCKING_TRANSPARENT_PAYLOAD_ALPHA = 0.50f; // For u
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
static void SetCurrentWindow(ImGuiWindow* window);
|
static void SetCurrentWindow(ImGuiWindow* window);
|
||||||
static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond);
|
|
||||||
static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond);
|
|
||||||
static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond);
|
|
||||||
static void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size);
|
static void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size);
|
||||||
static void FindHoveredWindow();
|
static void FindHoveredWindow();
|
||||||
static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags);
|
static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags);
|
||||||
@ -6586,7 +6583,7 @@ void ImGui::SetWindowScrollY(ImGuiWindow* window, float new_scroll_y)
|
|||||||
window->DC.CursorMaxPos.y -= window->Scroll.y;
|
window->DC.CursorMaxPos.y -= window->Scroll.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond)
|
void ImGui::SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond)
|
||||||
{
|
{
|
||||||
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
||||||
if (cond && (window->SetWindowPosAllowFlags & cond) == 0)
|
if (cond && (window->SetWindowPosAllowFlags & cond) == 0)
|
||||||
@ -6621,7 +6618,7 @@ ImVec2 ImGui::GetWindowSize()
|
|||||||
return window->Size;
|
return window->Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond)
|
void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond)
|
||||||
{
|
{
|
||||||
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
||||||
if (cond && (window->SetWindowSizeAllowFlags & cond) == 0)
|
if (cond && (window->SetWindowSizeAllowFlags & cond) == 0)
|
||||||
@ -6664,7 +6661,7 @@ void ImGui::SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond)
|
|||||||
SetWindowSize(window, size, cond);
|
SetWindowSize(window, size, cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond)
|
void ImGui::SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond)
|
||||||
{
|
{
|
||||||
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
// Test condition (NB: bit 0 is always true) and clear flags for next time
|
||||||
if (cond && (window->SetWindowCollapsedAllowFlags & cond) == 0)
|
if (cond && (window->SetWindowCollapsedAllowFlags & cond) == 0)
|
||||||
|
@ -1495,6 +1495,9 @@ namespace ImGui
|
|||||||
IMGUI_API float GetWindowScrollMaxX(ImGuiWindow* window);
|
IMGUI_API float GetWindowScrollMaxX(ImGuiWindow* window);
|
||||||
IMGUI_API float GetWindowScrollMaxY(ImGuiWindow* window);
|
IMGUI_API float GetWindowScrollMaxY(ImGuiWindow* window);
|
||||||
IMGUI_API ImRect GetWindowAllowedExtentRect(ImGuiWindow* window);
|
IMGUI_API ImRect GetWindowAllowedExtentRect(ImGuiWindow* window);
|
||||||
|
IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond);
|
||||||
|
IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond);
|
||||||
|
IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond);
|
||||||
|
|
||||||
IMGUI_API void SetCurrentFont(ImFont* font);
|
IMGUI_API void SetCurrentFont(ImFont* font);
|
||||||
inline ImFont* GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; }
|
inline ImFont* GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; }
|
||||||
|
Loading…
Reference in New Issue
Block a user