From d0daba029fdb215f0609facd5a4f65fffb0e3b86 Mon Sep 17 00:00:00 2001 From: Timur Kelman Date: Sat, 22 Feb 2025 22:19:49 +0100 Subject: [PATCH] spectate.lua: fix individual stress levels * set a stress level instead of the whole table * place the list widget deeper than toggle buttons --- gui/spectate.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/spectate.lua b/gui/spectate.lua index 3c708be7a..13f7fbd57 100644 --- a/gui/spectate.lua +++ b/gui/spectate.lua @@ -53,7 +53,7 @@ local function create_toggle_button(frame, cfg_elem, hotkey, label, cfg_elem_key return ToggleLabel{ frame=frame, initial_option=spectate.get_config_elem(cfg_elem, cfg_elem_key), - on_change=function(val) dfhack.run_command('spectate', 'set', cfg_elem, tostring(val)) end, + on_change=function(val) dfhack.run_command('spectate', 'set', cfg_elem, cfg_elem_key, tostring(val)) end, key=hotkey, label=label, } @@ -151,7 +151,7 @@ local function create_stress_list(frame, colFollow, colHover) table.insert(choices, make_choice({{text=elem.text, pen=elem.pen}, ' ', elem.name}, tlFollow, tlHover)) end - table.insert(subviews, widgets.List{ + table.insert(subviews, 1, widgets.List{ frame={l=2}, on_submit=function(_, choice) choice.data.tlFollow:cycle() end, on_submit2=function(_, choice) choice.data.tlHover:cycle() end,