mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-01 03:19:12 +08:00
Docking: amend to allow localizing docking specific user facing string. (#5895)
This commit is contained in:
parent
595a428baa
commit
fad8afd62a
@ -4964,6 +4964,7 @@ static const ImGuiLocEntry GLocalizationEntriesEnUS[] =
|
||||
{ ImGuiLocKey_WindowingMainMenuBar, "(Main menu bar)" },
|
||||
{ ImGuiLocKey_WindowingPopup, "(Popup)" },
|
||||
{ ImGuiLocKey_WindowingUntitled, "(Untitled)" },
|
||||
{ ImGuiLocKey_DockingHideTabBar, "Hide tab bar###HideTabBar" },
|
||||
};
|
||||
|
||||
void ImGui::Initialize()
|
||||
@ -12357,7 +12358,7 @@ static const char* GetFallbackWindowNameForWindowingList(ImGuiWindow* window)
|
||||
if ((window->Flags & ImGuiWindowFlags_MenuBar) && strcmp(window->Name, "##MainMenuBar") == 0)
|
||||
return ImGui::LocalizeGetMsg(ImGuiLocKey_WindowingMainMenuBar);
|
||||
if (window->DockNodeAsHost)
|
||||
return "(Dock node)";
|
||||
return "(Dock node)"; // Not normally shown to user.
|
||||
return ImGui::LocalizeGetMsg(ImGuiLocKey_WindowingUntitled);
|
||||
}
|
||||
|
||||
@ -15946,7 +15947,7 @@ static ImGuiID ImGui::DockNodeUpdateWindowMenu(ImGuiDockNode* node, ImGuiTabBar*
|
||||
node->IsFocused = true;
|
||||
if (tab_bar->Tabs.Size == 1)
|
||||
{
|
||||
if (MenuItem("Hide tab bar", NULL, node->IsHiddenTabBar()))
|
||||
if (MenuItem(LocalizeGetMsg(ImGuiLocKey_DockingHideTabBar), NULL, node->IsHiddenTabBar()))
|
||||
node->WantHiddenTabBarToggle = true;
|
||||
}
|
||||
else
|
||||
|
@ -1802,6 +1802,7 @@ enum ImGuiLocKey : int
|
||||
ImGuiLocKey_WindowingMainMenuBar,
|
||||
ImGuiLocKey_WindowingPopup,
|
||||
ImGuiLocKey_WindowingUntitled,
|
||||
ImGuiLocKey_DockingHideTabBar,
|
||||
ImGuiLocKey_COUNT
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user