Skip to content

Commit b865e78

Browse files
committed
Add a warning about when settings are applied.
1 parent 3628d5d commit b865e78

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

LuaMenu/widgets/gui_settings_window.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,25 @@ end
12421242
local settingsComboBoxes = {}
12431243
local settingsUpdateFunction = {}
12441244

1245+
local function MakeRestartWarning(offset)
1246+
local Configuration = WG.Chobby.Configuration
1247+
1248+
local warningLabel = Label:New {
1249+
name = "warningLabel",
1250+
x = 20,
1251+
y = offset + TEXT_OFFSET,
1252+
width = 90,
1253+
height = 40,
1254+
valign = "top",
1255+
align = "left",
1256+
parent = window,
1257+
font = Configuration:GetFont(2),
1258+
caption = "Warning: Most changes do not affect battles in progress.",
1259+
}
1260+
1261+
return warningLabel, offset + ITEM_OFFSET
1262+
end
1263+
12451264
local function MakePresetsControl(settingPresets, offset)
12461265
local Configuration = WG.Chobby.Configuration
12471266

@@ -1559,6 +1578,9 @@ local function PopulateTab(settingPresets, settingOptions, settingsDefault)
15591578
label, list, customSettingsSwitch, offset = MakePresetsControl(settingPresets, offset)
15601579
children[#children + 1] = label
15611580
children[#children + 1] = list
1581+
1582+
label, offset = MakeRestartWarning(offset)
1583+
children[#children + 1] = label
15621584
end
15631585

15641586
for i = 1, #settingOptions do

0 commit comments

Comments
 (0)