Back to Home

ESO Lua File v101044

pregameandingame/optionspanels/optionspanel_interface_shared.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local ZO_OptionsPanel_Interface_ControlData =
{
    --UI Settings
    [SETTING_TYPE_UI] =
    {
        [UI_SETTING_TEXT_LANGUAGE] =
        {
            controlType = OPTIONS_FINITE_LIST,
            system = SETTING_TYPE_UI,
            panel = SETTING_PANEL_INTERFACE,
            settingId = UI_SETTING_TEXT_LANGUAGE,
            text = SI_INTERFACE_OPTIONS_TEXT_LANGUAGE,
            tooltipText = SI_INTERFACE_OPTIONS_TEXT_LANGUAGE_TOOLTIP,
            valid = function()
                local validValues = {}
                for i = OFFICIAL_LANGUAGE_ITERATION_BEGIN, OFFICIAL_LANGUAGE_ITERATION_END do
                    if ZoIsOfficialLanguageSupported(i) then
                        table.insert(validValues, i)
                    end
                end
                return validValues
            end,
            valueStrings = function()
                local valueStrings = {}
                for i = OFFICIAL_LANGUAGE_ITERATION_BEGIN, OFFICIAL_LANGUAGE_ITERATION_END do
                    if ZoIsOfficialLanguageSupported(i) then
                        table.insert(valueStrings, function() return GetString("SI_OFFICIALLANGUAGE", i) end)
                    end
                end
                return valueStrings
            end,
            mustPushApply = true,
        },
    },
}
ZO_SharedOptions.AddTableToPanel(SETTING_PANEL_INTERFACE, ZO_OptionsPanel_Interface_ControlData)