138 lines
6.9 KiB
Lua
138 lines
6.9 KiB
Lua
|
function CzechQuestsAddon:AddQuestOptions(optionsFrame)
|
||
|
|
||
|
if (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then
|
||
|
-- Add DARK mode checkbox
|
||
|
local darkModeCheckbox = Settings.RegisterAddOnSetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_DARK_MODE",
|
||
|
"TRANSLATION_QUEST_FRAME_DARK_MODE",
|
||
|
CzechQuestsAddon_Store.config,
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_DARK_MODE),
|
||
|
"Použít tmavý režim",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_DARK_MODE
|
||
|
)
|
||
|
Settings.CreateCheckbox(optionsFrame, darkModeCheckbox)
|
||
|
end
|
||
|
|
||
|
-- define FontOptions
|
||
|
local function GetFontOptions()
|
||
|
local container = Settings.CreateControlTextContainer()
|
||
|
container:Add("morpheus_cz.ttf", "Morpheus (cz)")
|
||
|
container:Add("frizquadratatt_cz.ttf", "Friz Quadrata TT (cz)")
|
||
|
container:Add("quicksand.ttf", "Quicksand")
|
||
|
container:Add("caveat.ttf", "Caveat")
|
||
|
return container:GetData()
|
||
|
end
|
||
|
|
||
|
-- Add header font dropdown menu
|
||
|
local headerFontFamilyDropdown = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_HEADER_FONT_FAMILY",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_HEADER_FONT_FAMILY),
|
||
|
"Písmo nadpisu",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_HEADER_FONT_FAMILY,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_HEADER_FONT_FAMILY
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_HEADER_FONT_FAMILY = value
|
||
|
CzechQuestsAddon:UpdateTranslationQuestFrameFontSettings()
|
||
|
end
|
||
|
)
|
||
|
Settings.CreateDropdown(optionsFrame, headerFontFamilyDropdown, GetFontOptions)
|
||
|
|
||
|
-- Add text font dropdown menu
|
||
|
local textFontFamilyDropdown = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_TEXT_FONT_FAMILY",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_FAMILY),
|
||
|
"Písmo textu",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_FAMILY,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_FAMILY
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_FAMILY = value
|
||
|
CzechQuestsAddon:UpdateTranslationQuestFrameFontSettings()
|
||
|
end
|
||
|
)
|
||
|
Settings.CreateDropdown(optionsFrame, textFontFamilyDropdown, GetFontOptions)
|
||
|
|
||
|
-- Add slider for change primary header font size
|
||
|
local primaryHeaderFontSizeSlider = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_PRIMARY_HEADER_FONT_SIZE",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_PRIMARY_HEADER_FONT_SIZE),
|
||
|
"Velikost názvu",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_PRIMARY_HEADER_FONT_SIZE,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_PRIMARY_HEADER_FONT_SIZE
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_PRIMARY_HEADER_FONT_SIZE = value
|
||
|
CzechQuestsAddon:UpdateTranslationQuestFrameFontSettings()
|
||
|
end
|
||
|
)
|
||
|
local primaryHeaderFontSizeSliderOptions = Settings.CreateSliderOptions(10, 30, 1)
|
||
|
primaryHeaderFontSizeSliderOptions:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
||
|
Settings.CreateSlider(optionsFrame, primaryHeaderFontSizeSlider, primaryHeaderFontSizeSliderOptions)
|
||
|
|
||
|
-- Add slider for change secondary header font size
|
||
|
local secondaryHeaderFontSizeSlider = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_SECONDARY_HEADER_FONT_SIZE",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_SECONDARY_HEADER_FONT_SIZE),
|
||
|
"Velikost nadpisu",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_SECONDARY_HEADER_FONT_SIZE,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_SECONDARY_HEADER_FONT_SIZE
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_SECONDARY_HEADER_FONT_SIZE = value
|
||
|
CzechQuestsAddon:UpdateTranslationQuestFrameFontSettings()
|
||
|
end
|
||
|
)
|
||
|
local secondaryHeaderFontSizeSliderOptions = Settings.CreateSliderOptions(10, 30, 1)
|
||
|
secondaryHeaderFontSizeSliderOptions:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
||
|
Settings.CreateSlider(optionsFrame, secondaryHeaderFontSizeSlider, secondaryHeaderFontSizeSliderOptions)
|
||
|
|
||
|
|
||
|
-- Add slider for change secondary header font size
|
||
|
local textFontSizeSlider = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_TEXT_FONT_SIZE",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_SIZE),
|
||
|
"Velikost textu",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_SIZE,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_SIZE
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXT_FONT_SIZE = value
|
||
|
CzechQuestsAddon:UpdateTranslationQuestFrameFontSettings()
|
||
|
end
|
||
|
)
|
||
|
local textFontSizeSliderOptions = Settings.CreateSliderOptions(10, 30, 1)
|
||
|
textFontSizeSliderOptions:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
||
|
Settings.CreateSlider(optionsFrame, textFontSizeSlider, textFontSizeSliderOptions)
|
||
|
|
||
|
-- Add slider for change secondary header font size
|
||
|
local textureAlphaSlider = Settings.RegisterProxySetting(
|
||
|
optionsFrame,
|
||
|
"CzechQuestsAddon__TRANSLATION_QUEST_FRAME_TEXTURE_ALPHA",
|
||
|
type(CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXTURE_ALPHA),
|
||
|
"Pruhlednost pozadí",
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXTURE_ALPHA,
|
||
|
function()
|
||
|
return CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXTURE_ALPHA
|
||
|
end,
|
||
|
function(value)
|
||
|
CzechQuestsAddon_Store.config.TRANSLATION_QUEST_FRAME_TEXTURE_ALPHA = value
|
||
|
end
|
||
|
)
|
||
|
local textureAlphaSliderOptions = Settings.CreateSliderOptions(10, 100, 10)
|
||
|
textureAlphaSliderOptions:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
||
|
Settings.CreateSlider(optionsFrame, textureAlphaSlider, textureAlphaSliderOptions)
|
||
|
|
||
|
end
|