This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.lua
75 lines (69 loc) · 2.02 KB
/
settings.lua
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
dofile("data/scripts/lib/mod_settings.lua")
local mod_id = "youtube_integration"
mod_settings = {
{
id = "debug",
ui_name = "DEBUG",
value_default = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
ui_fn = mod_setting_vertical_spacing,
not_setting = true,
},
{
id = "shown",
ui_name = "Properties window",
value_default = "shown",
values = { {"shown", "shown"}, {"hidden", "hidden"} },
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
ui_fn = mod_setting_vertical_spacing,
not_setting = true,
},
{
category_id = "poll_settings",
ui_name = "POLL SETTINGS",
settings = {
{
id = "period",
ui_name = "Period",
value_min = 750,
value_max = 10000,
value_default = 5000,
value_display_formatting = " $0 ms",
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
id = "duration",
ui_name = "Duration",
value_min = 6,
value_max = 60,
value_default = 10,
value_display_formatting = " $0 s",
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
id = "frequency",
ui_name = "Poll frequency",
value_default = "medium",
values = {
{"high", "high"}, -- [120; 630]
{"medium", "medium"}, -- [630; 2520]
{"low", "low"} -- [2520; 6300]
},
scope = MOD_SETTING_SCOPE_RUNTIME,
}
}
}
}
function ModSettingsUpdate( init_scope )
mod_settings_update( mod_id, mod_settings, init_scope )
end
function ModSettingsGuiCount()
return mod_settings_gui_count( mod_id, mod_settings )
end
function ModSettingsGui( gui, in_main_menu )
mod_settings_gui( mod_id, mod_settings, gui, in_main_menu )
end