We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d04b116 commit 9e91636Copy full SHA for 9e91636
1 file changed
plugins/lua/sort/deathcause_button.lua
@@ -31,20 +31,20 @@ function DeathCauseOverlay:init()
31
local creatures = df.global.game.main_interface.info.creatures
32
local list_widget = dfhack.gui.getWidget(creatures, 'Tabs', 'Dead/Missing')
33
if not list_widget then return nil end
34
-
+
35
local children = dfhack.gui.getWidgetChildren(list_widget)
36
local list_container = children[1]
37
local grandchildren = dfhack.gui.getWidgetChildren(list_container)
38
39
local scrollable_list = grandchildren[2]
40
if not scrollable_list then
41
return nil
42
end
43
44
local rows = dfhack.gui.getWidgetChildren(scrollable_list)
45
46
local cursor_idx = list_widget.cursor_idx or 0
47
48
if cursor_idx >= 0 and cursor_idx < #rows then
49
local row = rows[cursor_idx + 1]
50
0 commit comments