mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
Set explicit fallback font size, and add fallback font notice window (#800)
This commit is contained in:
parent
2becb12855
commit
1e5c906ce8
5 changed files with 242 additions and 80 deletions
|
|
@ -197,7 +197,9 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
var configuration = Service<DalamudConfiguration>.Get();
|
||||
var interfaceManager = Service<InterfaceManager>.Get();
|
||||
|
||||
var rebuildFont = interfaceManager.FontGamma != configuration.FontGammaLevel;
|
||||
var rebuildFont = interfaceManager.FontGamma != configuration.FontGammaLevel
|
||||
|| interfaceManager.FontResolutionLevel != configuration.FontResolutionLevel
|
||||
|| interfaceManager.UseAxis != configuration.UseAxisFontsFromGame;
|
||||
|
||||
ImGui.GetIO().FontGlobalScale = configuration.GlobalUiScale;
|
||||
interfaceManager.FontGammaOverride = null;
|
||||
|
|
@ -396,6 +398,18 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.GetIO().Fonts.TexHeight));
|
||||
ImGui.PopStyleColor();
|
||||
|
||||
if (Service<DalamudConfiguration>.Get().DisableFontFallbackNotice)
|
||||
{
|
||||
ImGui.Text(Loc.Localize("DalamudSettingsFontResolutionLevelWarningDisabled", "Warning will not be displayed even when the limits are enforced and fonts become blurry."));
|
||||
if (ImGui.Button(Loc.Localize("DalamudSettingsFontResolutionLevelWarningReset", "Show warnings") + "##DalamudSettingsFontResolutionLevelWarningReset"))
|
||||
{
|
||||
Service<DalamudConfiguration>.Get().DisableFontFallbackNotice = false;
|
||||
Service<DalamudConfiguration>.Get().Save();
|
||||
if (Service<InterfaceManager>.Get().IsFallbackFontMode)
|
||||
Service<DalamudInterface>.Get().OpenFallbackFontNoticeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
ImGuiHelpers.ScaledDummy(10);
|
||||
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingToggleUiHideOptOutNote", "Plugins may independently opt out of the settings below."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue