94 lines
4.6 KiB
Lua
Executable file
94 lines
4.6 KiB
Lua
Executable file
function CzechQuestsAddon:AddSpeechOptions(optionsFrame)
|
|
|
|
-- Add header font dropdown menu
|
|
local npcFontFamilyDropdown = Settings.RegisterProxySetting(
|
|
optionsFrame,
|
|
"CzechQuestsAddon__TRANSLATION_SPEECH_FRAME_NPC_FONT_FAMILY",
|
|
type(CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_FAMILY),
|
|
"Písmo jména",
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_FAMILY,
|
|
function()
|
|
return CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_FAMILY
|
|
end,
|
|
function(value)
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_FAMILY = value
|
|
CzechQuestsAddon:UpdateTranslationSpeechFrameSettings()
|
|
end
|
|
)
|
|
Settings.CreateDropdown(optionsFrame, npcFontFamilyDropdown, GetFontOptions)
|
|
|
|
-- Add text font dropdown menu
|
|
local textFontFamilyDropdown = Settings.RegisterProxySetting(
|
|
optionsFrame,
|
|
"CzechQuestsAddon__TRANSLATION_SPEECH_FRAME_TEXT_FONT_FAMILY",
|
|
type(CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_FAMILY),
|
|
"Písmo textu",
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_FAMILY,
|
|
function()
|
|
return CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_FAMILY
|
|
end,
|
|
function(value)
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_FAMILY = value
|
|
CzechQuestsAddon:UpdateTranslationSpeechFrameSettings()
|
|
end
|
|
)
|
|
Settings.CreateDropdown(optionsFrame, textFontFamilyDropdown, GetFontOptions)
|
|
|
|
-- Add slider for change primary header font size
|
|
local npcFontSizeSlider = Settings.RegisterProxySetting(
|
|
optionsFrame,
|
|
"CzechQuestsAddon__TRANSLATION_SPEECH_FRAME_NPC_FONT_SIZE",
|
|
type(CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_SIZE),
|
|
"Velikost jméma",
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_SIZE,
|
|
function()
|
|
return CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_SIZE
|
|
end,
|
|
function(value)
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_NPC_FONT_SIZE = value
|
|
CzechQuestsAddon:UpdateTranslationSpeechFrameSettings()
|
|
end
|
|
)
|
|
local npcFontSizeOption = Settings.CreateSliderOptions(8, 30, 1)
|
|
npcFontSizeOption:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
|
Settings.CreateSlider(optionsFrame, npcFontSizeSlider, npcFontSizeOption)
|
|
|
|
-- Add slider for change secondary header font size
|
|
local textFontSizeSlider = Settings.RegisterProxySetting(
|
|
optionsFrame,
|
|
"CzechQuestsAddon__TRANSLATION_SPEECH_FRAME_TEXT_FONT_SIZE",
|
|
type(CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_SIZE),
|
|
"Velikost textu",
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_SIZE,
|
|
function()
|
|
return CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_SIZE
|
|
end,
|
|
function(value)
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_TEXT_FONT_SIZE = value
|
|
CzechQuestsAddon:UpdateTranslationSpeechFrameSettings()
|
|
end
|
|
)
|
|
local textFontSizeSliderOptions = Settings.CreateSliderOptions(8, 30, 1)
|
|
textFontSizeSliderOptions:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
|
Settings.CreateSlider(optionsFrame, textFontSizeSlider, textFontSizeSliderOptions)
|
|
|
|
-- Add slider for change secondary header font size
|
|
local windowWidthSizeSlider = Settings.RegisterProxySetting(
|
|
optionsFrame,
|
|
"CzechQuestsAddon__TRANSLATION_SPEECH_FRAME_WIDTH",
|
|
type(CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_WIDTH),
|
|
"Šírka zpráva",
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_WIDTH,
|
|
function()
|
|
return CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_WIDTH
|
|
end,
|
|
function(value)
|
|
CzechQuestsAddon_Store.config.TRANSLATION_SPEECH_FRAME_WIDTH = value
|
|
CzechQuestsAddon:UpdateTranslationSpeechFrameSettings()
|
|
end
|
|
)
|
|
local windowWidthSizeSliderOption = Settings.CreateSliderOptions(200, 800, 10)
|
|
windowWidthSizeSliderOption:SetLabelFormatter(MinimalSliderWithSteppersMixin.Label.Right);
|
|
Settings.CreateSlider(optionsFrame, windowWidthSizeSlider, windowWidthSizeSliderOption)
|
|
|
|
end
|