Skip to content

Commit

Permalink
Attempt at making a GUI layout that better uses space
Browse files Browse the repository at this point in the history
  • Loading branch information
azrazalea committed Oct 10, 2023
1 parent 5d11aa5 commit da14516
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions warn-stranded.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,38 +175,46 @@ function WarningWindow:init(info)
widgets.List{
frame={h=15},
view_id = 'list',
text_pen = { fg = COLOR_GREY, bg = COLOR_BLACK },
cursor_pen = { fg = COLOR_BLACK, bg = COLOR_GREEN },
on_submit=self:callback('onIgnore'),
on_select=self:callback('onZoom'),
on_double_click=self:callback('onIgnore'),
on_double_click2=self:callback('onToggleGroup'),
},
widgets.Panel{
frame={h=5},
autoarrange_subviews=true,
subviews = {
widgets.HotkeyLabel{
frame={b=3, l=0},
key='SELECT',
label='Toggle ignore',
auto_width=true,
},
widgets.HotkeyLabel{
frame={b=3, l=21},
key='CUSTOM_G',
label='Toggle group',
on_activate = self:callback('onToggleGroup'),
auto_width=true,

},
widgets.HotkeyLabel{
frame={b=3, l=37},
key = 'CUSTOM_SHIFT_I',
label = 'Ignore all',
on_activate = self:callback('onIgnoreAll'),
auto_width=true,

},
widgets.HotkeyLabel{
frame={b=3, l=52},
key = 'CUSTOM_SHIFT_C',
label = 'Clear all ignored',
on_activate = self:callback('onClear'),
auto_width=true,

},
widgets.WrappedLabel{
frame={b=0, l=0, r=0},
frame={b=1, l=0},
text_to_wrap='Click to toggle unit ignore. Shift doubleclick to toggle a group.',
},
}
Expand Down

0 comments on commit da14516

Please sign in to comment.