use same hotkey for sorting, hide unused elements

develop
Myk Taylor 2023-03-05 23:04:35 -08:00
parent 80addc92d1
commit e9060624af
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

@ -267,10 +267,11 @@ function ItemSelection:init()
choices=self:get_choices(sort_by_recency), choices=self:get_choices(sort_by_recency),
icon_width=2, icon_width=2,
on_submit=self:callback('toggle_group'), on_submit=self:callback('toggle_group'),
edit_on_char=function(ch) return ch:match('[%l -]') end,
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
frame={l=0, b=2}, frame={l=0, b=2},
key='CUSTOM_CTRL_X', key='CUSTOM_SHIFT_R',
label='Sort by:', label='Sort by:',
options={ options={
{label='Recently used', value=sort_by_recency}, {label='Recently used', value=sort_by_recency},
@ -288,7 +289,7 @@ function ItemSelection:init()
}, },
widgets.HotkeyLabel{ widgets.HotkeyLabel{
frame={l=22, b=1}, frame={l=22, b=1},
key='CUSTOM_CTRL_D', key='CUSTOM_SHIFT_B',
label='Build', label='Build',
auto_width=true, auto_width=true,
on_activate=self:callback('submit'), on_activate=self:callback('submit'),
@ -1760,7 +1761,7 @@ function PlannerOverlay:onInput(keys)
end end
end end
end end
return keys._MOUSE_L return keys._MOUSE_L or keys.SELECT
end end
function PlannerOverlay:render(dc) function PlannerOverlay:render(dc)
@ -1994,6 +1995,7 @@ function InspectorOverlay:init()
frame={t=11, l=0}, frame={t=11, l=0},
label='adjust filters', label='adjust filters',
key='CUSTOM_CTRL_F', key='CUSTOM_CTRL_F',
visible=false, -- until implemented
}, },
widgets.HotkeyLabel{ widgets.HotkeyLabel{
frame={t=12, l=0}, frame={t=12, l=0},