mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 05:27:01 +00:00
Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
This commit is contained in:
parent
f93dce9513
commit
49a451d247
@ -50,6 +50,7 @@ Other Changes:
|
|||||||
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
|
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
|
||||||
- Window: Fixed default proportional item width lagging by one frame on resize.
|
- Window: Fixed default proportional item width lagging by one frame on resize.
|
||||||
- Window: Fixed popups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
|
- Window: Fixed popups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
|
||||||
|
- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
|
||||||
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
|
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
|
||||||
- InputText: On a Mac, filter out characters when the Cmd modifier is held. (#1747) [@sivu]
|
- InputText: On a Mac, filter out characters when the Cmd modifier is held. (#1747) [@sivu]
|
||||||
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
|
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
|
||||||
|
@ -5363,13 +5363,13 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl
|
|||||||
window->Flags = flags;
|
window->Flags = flags;
|
||||||
g.WindowsById.SetVoidPtr(window->ID, window);
|
g.WindowsById.SetVoidPtr(window->ID, window);
|
||||||
|
|
||||||
|
// Default/arbitrary window position. Use SetNextWindowPos() with the appropriate condition flag to change the initial position of a window.
|
||||||
|
window->Pos = window->PosFloat = ImVec2(60, 60);
|
||||||
|
|
||||||
// User can disable loading and saving of settings. Tooltip and child windows also don't store settings.
|
// User can disable loading and saving of settings. Tooltip and child windows also don't store settings.
|
||||||
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
||||||
{
|
{
|
||||||
// Retrieve settings from .ini file
|
// Retrieve settings from .ini file
|
||||||
// Use SetWindowPos() or SetNextWindowPos() with the appropriate condition flag to change the initial position of a window.
|
|
||||||
window->Pos = window->PosFloat = ImVec2(60, 60);
|
|
||||||
|
|
||||||
if (ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID))
|
if (ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID))
|
||||||
{
|
{
|
||||||
SetWindowConditionAllowFlags(window, ImGuiCond_FirstUseEver, false);
|
SetWindowConditionAllowFlags(window, ImGuiCond_FirstUseEver, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user