mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
Merge pull request #196 from Caraxi/master
Scale dalamud windows by the global font scale
This commit is contained in:
commit
bcd6083301
4 changed files with 19 additions and 19 deletions
|
|
@ -32,16 +32,16 @@ namespace Dalamud.Interface {
|
||||||
|
|
||||||
ImGui.Text($"The in-game addon has been updated to version D{this.assemblyVersion}.");
|
ImGui.Text($"The in-game addon has been updated to version D{this.assemblyVersion}.");
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(10, 10));
|
ImGui.Dummy(new Vector2(10, 10) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Text("The following changes were introduced:");
|
ImGui.Text("The following changes were introduced:");
|
||||||
ImGui.Text(ChangeLog);
|
ImGui.Text(ChangeLog);
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(10, 10));
|
ImGui.Dummy(new Vector2(10, 10) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Text("Thank you for using our tools!");
|
ImGui.Text("Thank you for using our tools!");
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(10, 10));
|
ImGui.Dummy(new Vector2(10, 10) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.PushFont(InterfaceManager.IconFont);
|
ImGui.PushFont(InterfaceManager.IconFont);
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ namespace Dalamud.Interface {
|
||||||
ImGui.PopFont();
|
ImGui.PopFont();
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Dummy(new Vector2(20, 0));
|
ImGui.Dummy(new Vector2(20, 0) * ImGui.GetIO().FontGlobalScale);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
if (ImGui.Button("Close")) {
|
if (ImGui.Button("Close")) {
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ Thank you for using XIVLauncher and Dalamud!
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Draw() {
|
public bool Draw() {
|
||||||
var windowSize = new Vector2(500, 400);
|
var windowSize = new Vector2(500, 400) * ImGui.GetIO().FontGlobalScale;
|
||||||
ImGui.SetNextWindowSize(windowSize, ImGuiCond.Always);
|
ImGui.SetNextWindowSize(windowSize, ImGuiCond.Always);
|
||||||
|
|
||||||
var screenSize = ImGui.GetIO().DisplaySize;
|
var screenSize = ImGui.GetIO().DisplaySize;
|
||||||
|
|
@ -137,13 +137,13 @@ Thank you for using XIVLauncher and Dalamud!
|
||||||
|
|
||||||
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 0));
|
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 0));
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(0, 340f));
|
ImGui.Dummy(new Vector2(0, 340f) * ImGui.GetIO().FontGlobalScale);
|
||||||
ImGui.Text("");
|
ImGui.Text("");
|
||||||
|
|
||||||
ImGui.SameLine(150f);
|
ImGui.SameLine(150f);
|
||||||
ImGui.Image(this.logoTexture.ImGuiHandle, new Vector2(190f, 190f));
|
ImGui.Image(this.logoTexture.ImGuiHandle, new Vector2(190f, 190f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(0, 20f));
|
ImGui.Dummy(new Vector2(0, 20f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
var windowX = ImGui.GetWindowSize().X;
|
var windowX = ImGui.GetWindowSize().X;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ namespace Dalamud.Interface
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public bool Draw() {
|
public bool Draw() {
|
||||||
ImGui.SetNextWindowSize(new Vector2(500, 500), ImGuiCond.Always);
|
ImGui.SetNextWindowSize(new Vector2(500, 500) * ImGui.GetIO().FontGlobalScale, ImGuiCond.Always);
|
||||||
|
|
||||||
var isOpen = true;
|
var isOpen = true;
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@ namespace Dalamud.Interface
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.BeginChild("scrolling", new Vector2(499, 430), false, ImGuiWindowFlags.HorizontalScrollbar);
|
ImGui.BeginChild("scrolling", new Vector2(499, 430) * ImGui.GetIO().FontGlobalScale, false, ImGuiWindowFlags.HorizontalScrollbar);
|
||||||
|
|
||||||
if (ImGui.BeginTabBar("SetTabBar")) {
|
if (ImGui.BeginTabBar("SetTabBar")) {
|
||||||
if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsGeneral", "General"))) {
|
if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsGeneral", "General"))) {
|
||||||
|
|
@ -76,14 +76,14 @@ namespace Dalamud.Interface
|
||||||
this.languages.Length);
|
this.languages.Length);
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsLanguageHint", "Select the language Dalamud will be displayed in."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsLanguageHint", "Select the language Dalamud will be displayed in."));
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(5f, 5f));
|
ImGui.Dummy(new Vector2(5f, 5f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Text(Loc.Localize("DalamudSettingsChannel", "General Chat Channel"));
|
ImGui.Text(Loc.Localize("DalamudSettingsChannel", "General Chat Channel"));
|
||||||
ImGui.Combo("##XlChatTypeCombo", ref this.dalamudMessagesChatType, this.chatTypes,
|
ImGui.Combo("##XlChatTypeCombo", ref this.dalamudMessagesChatType, this.chatTypes,
|
||||||
this.chatTypes.Length);
|
this.chatTypes.Length);
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsChannelHint", "Select the chat channel that is to be used for general Dalamud messages."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsChannelHint", "Select the chat channel that is to be used for general Dalamud messages."));
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(5f, 5f));
|
ImGui.Dummy(new Vector2(5f, 5f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Checkbox(Loc.Localize("DalamudSettingsFlash", "Flash FFXIV window on duty pop"), ref this.doCfTaskBarFlash);
|
ImGui.Checkbox(Loc.Localize("DalamudSettingsFlash", "Flash FFXIV window on duty pop"), ref this.doCfTaskBarFlash);
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsFlashHint", "Select, if the FFXIV window should be flashed in your task bar when a duty is ready."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsFlashHint", "Select, if the FFXIV window should be flashed in your task bar when a duty is ready."));
|
||||||
|
|
@ -101,7 +101,7 @@ namespace Dalamud.Interface
|
||||||
|
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsGlobalUiScaleHint", "Scale all XIVLauncher UI elements - useful for 4K displays."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsGlobalUiScaleHint", "Scale all XIVLauncher UI elements - useful for 4K displays."));
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(10f, 16f));
|
ImGui.Dummy(new Vector2(10f, 16f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideOptOutNote", "Plugins may independently opt out of the settings below."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideOptOutNote", "Plugins may independently opt out of the settings below."));
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ namespace Dalamud.Interface
|
||||||
{
|
{
|
||||||
ImGui.Text(Loc.Localize("DalamudSettingsRestartHint", "You need to restart your game after changing these settings."));
|
ImGui.Text(Loc.Localize("DalamudSettingsRestartHint", "You need to restart your game after changing these settings."));
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(10f, 10f));
|
ImGui.Dummy(new Vector2(10f, 10f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Checkbox(Loc.Localize("DalamudSettingsPluginTest", "Get plugin testing builds"), ref this.doPluginTest);
|
ImGui.Checkbox(Loc.Localize("DalamudSettingsPluginTest", "Get plugin testing builds"), ref this.doPluginTest);
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsPluginTestHint", "Check this box to receive testing prereleases for plugins."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsPluginTestHint", "Check this box to receive testing prereleases for plugins."));
|
||||||
|
|
|
||||||
|
|
@ -51,20 +51,20 @@ namespace Dalamud.Plugin
|
||||||
public bool Draw() {
|
public bool Draw() {
|
||||||
var windowOpen = true;
|
var windowOpen = true;
|
||||||
|
|
||||||
ImGui.SetNextWindowSize(new Vector2(750, 520));
|
ImGui.SetNextWindowSize(new Vector2(750, 520) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Begin(Loc.Localize("InstallerHeader", "Plugin Installer") + (this.dalamud.Configuration.DoPluginTest ? " (TESTING)" : string.Empty) + "###XlPluginInstaller", ref windowOpen,
|
ImGui.Begin(Loc.Localize("InstallerHeader", "Plugin Installer") + (this.dalamud.Configuration.DoPluginTest ? " (TESTING)" : string.Empty) + "###XlPluginInstaller", ref windowOpen,
|
||||||
ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoScrollbar);
|
ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoScrollbar);
|
||||||
|
|
||||||
ImGui.Text(Loc.Localize("InstallerHint", "This window allows you install and remove in-game plugins.\nThey are made by third-party developers."));
|
ImGui.Text(Loc.Localize("InstallerHint", "This window allows you install and remove in-game plugins.\nThey are made by third-party developers."));
|
||||||
ImGui.SameLine(ImGui.GetWindowWidth() - 250);
|
ImGui.SameLine(ImGui.GetWindowWidth() - 250 * ImGui.GetIO().FontGlobalScale);
|
||||||
ImGui.SetNextItemWidth(240);
|
ImGui.SetNextItemWidth(240 * ImGui.GetIO().FontGlobalScale);
|
||||||
ImGui.InputTextWithHint("###XPlPluginInstaller_Search", Loc.Localize("InstallerSearch", "Search"), ref this.searchText, 100);
|
ImGui.InputTextWithHint("###XPlPluginInstaller_Search", Loc.Localize("InstallerSearch", "Search"), ref this.searchText, 100);
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
ImGui.BeginChild("scrolling", new Vector2(0, 400), true, ImGuiWindowFlags.HorizontalScrollbar);
|
ImGui.BeginChild("scrolling", new Vector2(0, 400 * ImGui.GetIO().FontGlobalScale), true, ImGuiWindowFlags.HorizontalScrollbar);
|
||||||
|
|
||||||
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(1, 3));
|
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(1, 3) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
if (this.dalamud.PluginRepository.State == PluginRepository.InitializationState.InProgress) {
|
if (this.dalamud.PluginRepository.State == PluginRepository.InitializationState.InProgress) {
|
||||||
ImGui.Text(Loc.Localize("InstallerLoading", "Loading plugins..."));
|
ImGui.Text(Loc.Localize("InstallerLoading", "Loading plugins..."));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue