Refactor config initialization and enhance font safety checks
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
This commit is contained in:
parent
30e04df022
commit
666bbc4659
3 changed files with 31 additions and 21 deletions
|
@ -17,6 +17,9 @@ end
|
|||
addon.API.CreateCzechFont = CreateCzechFont
|
||||
|
||||
local function UpdateCzechFont(FontString, name, size)
|
||||
if not FontString then
|
||||
return
|
||||
end
|
||||
local _, currentSize, flags = FontString:GetFont()
|
||||
FontString:SetFont(FontPath .. name, size or currentSize, flags)
|
||||
end
|
||||
|
|
|
@ -125,7 +125,7 @@ local function InitTactics()
|
|||
local layout = Options.layout
|
||||
layout:AddInitializer(CreateSettingsListSectionHeaderInitializer("Taktiky"))
|
||||
|
||||
CreateCheckbox("TACTIC_ENABLED", "Zapnout", Update)
|
||||
CreateCheckbox("TACTIC_ENABLED", "Zapnout *", Update)
|
||||
|
||||
CreateDropdown("TACTIC_TEXT_FONT_NAME", "Pismo *", addon.API.GetFontContainer, Update)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue