tweak color and layout

develop
Myk Taylor 2023-08-14 17:56:48 -07:00
parent d9fd090e52
commit 2620bfbb43
No known key found for this signature in database
1 changed files with 50 additions and 50 deletions

@ -226,28 +226,28 @@ function SquadAssignmentOverlay:init()
label='Sort by:', label='Sort by:',
key='CUSTOM_SHIFT_S', key='CUSTOM_SHIFT_S',
options={ options={
{label='any melee skill'..CH_DN, value=SORT_FNS.sort_by_any_melee_desc}, {label='any melee skill'..CH_DN, value=SORT_FNS.sort_by_any_melee_desc, pen=COLOR_GREEN},
{label='any melee skill'..CH_UP, value=SORT_FNS.sort_by_any_melee_asc}, {label='any melee skill'..CH_UP, value=SORT_FNS.sort_by_any_melee_asc, pen=COLOR_YELLOW},
{label='any ranged skill'..CH_DN, value=SORT_FNS.sort_by_any_ranged_desc}, {label='any ranged skill'..CH_DN, value=SORT_FNS.sort_by_any_ranged_desc, pen=COLOR_GREEN},
{label='any ranged skill'..CH_UP, value=SORT_FNS.sort_by_any_ranged_asc}, {label='any ranged skill'..CH_UP, value=SORT_FNS.sort_by_any_ranged_asc, pen=COLOR_YELLOW},
{label='any leader skill'..CH_DN, value=SORT_FNS.sort_by_leadership_desc}, {label='any leader skill'..CH_DN, value=SORT_FNS.sort_by_leadership_desc, pen=COLOR_GREEN},
{label='any leader skill'..CH_UP, value=SORT_FNS.sort_by_leadership_asc}, {label='any leader skill'..CH_UP, value=SORT_FNS.sort_by_leadership_asc, pen=COLOR_YELLOW},
{label='name'..CH_DN, value=sort_by_name_desc}, {label='name'..CH_DN, value=sort_by_name_desc, pen=COLOR_GREEN},
{label='name'..CH_UP, value=sort_by_name_asc}, {label='name'..CH_UP, value=sort_by_name_asc, pen=COLOR_YELLOW},
{label='migrant wave'..CH_DN, value=sort_by_migrant_wave_desc}, {label='migrant wave'..CH_DN, value=sort_by_migrant_wave_desc, pen=COLOR_GREEN},
{label='migrant wave'..CH_UP, value=sort_by_migrant_wave_asc}, {label='migrant wave'..CH_UP, value=sort_by_migrant_wave_asc, pen=COLOR_YELLOW},
{label='axe skill'..CH_DN, value=SORT_FNS.sort_by_axe_desc}, {label='axe skill'..CH_DN, value=SORT_FNS.sort_by_axe_desc, pen=COLOR_GREEN},
{label='axe skill'..CH_UP, value=SORT_FNS.sort_by_axe_asc}, {label='axe skill'..CH_UP, value=SORT_FNS.sort_by_axe_asc, pen=COLOR_YELLOW},
{label='sword skill'..CH_DN, value=SORT_FNS.sort_by_sword_desc}, {label='sword skill'..CH_DN, value=SORT_FNS.sort_by_sword_desc, pen=COLOR_GREEN},
{label='sword skill'..CH_UP, value=SORT_FNS.sort_by_sword_asc}, {label='sword skill'..CH_UP, value=SORT_FNS.sort_by_sword_asc, pen=COLOR_YELLOW},
{label='mace skill'..CH_DN, value=SORT_FNS.sort_by_mace_desc}, {label='mace skill'..CH_DN, value=SORT_FNS.sort_by_mace_desc, pen=COLOR_GREEN},
{label='mace skill'..CH_UP, value=SORT_FNS.sort_by_mace_asc}, {label='mace skill'..CH_UP, value=SORT_FNS.sort_by_mace_asc, pen=COLOR_YELLOW},
{label='hammer skill'..CH_DN, value=SORT_FNS.sort_by_hammer_desc}, {label='hammer skill'..CH_DN, value=SORT_FNS.sort_by_hammer_desc, pen=COLOR_GREEN},
{label='hammer skill'..CH_UP, value=SORT_FNS.sort_by_hammer_asc}, {label='hammer skill'..CH_UP, value=SORT_FNS.sort_by_hammer_asc, pen=COLOR_YELLOW},
{label='spear skill'..CH_DN, value=SORT_FNS.sort_by_spear_desc}, {label='spear skill'..CH_DN, value=SORT_FNS.sort_by_spear_desc, pen=COLOR_GREEN},
{label='spear skill'..CH_UP, value=SORT_FNS.sort_by_spear_asc}, {label='spear skill'..CH_UP, value=SORT_FNS.sort_by_spear_asc, pen=COLOR_YELLOW},
{label='crossbow skill'..CH_DN, value=SORT_FNS.sort_by_crossbow_desc}, {label='crossbow skill'..CH_DN, value=SORT_FNS.sort_by_crossbow_desc, pen=COLOR_GREEN},
{label='crossbow skill'..CH_UP, value=SORT_FNS.sort_by_crossbow_asc}, {label='crossbow skill'..CH_UP, value=SORT_FNS.sort_by_crossbow_asc, pen=COLOR_YELLOW},
}, },
initial_option=SORT_FNS.sort_by_any_melee_desc, initial_option=SORT_FNS.sort_by_any_melee_desc,
on_change=self:callback('refresh_list', 'sort'), on_change=self:callback('refresh_list', 'sort'),
@ -267,8 +267,8 @@ function SquadAssignmentOverlay:init()
frame={t=0, l=0, w=10}, frame={t=0, l=0, w=10},
options={ options={
{label='any melee', value=sort_noop}, {label='any melee', value=sort_noop},
{label='any melee'..CH_DN, value=SORT_FNS.sort_by_any_melee_desc}, {label='any melee'..CH_DN, value=SORT_FNS.sort_by_any_melee_desc, pen=COLOR_GREEN},
{label='any melee'..CH_UP, value=SORT_FNS.sort_by_any_melee_asc}, {label='any melee'..CH_UP, value=SORT_FNS.sort_by_any_melee_asc, pen=COLOR_YELLOW},
}, },
initial_option=SORT_FNS.sort_by_any_melee_desc, initial_option=SORT_FNS.sort_by_any_melee_desc,
option_gap=0, option_gap=0,
@ -279,8 +279,8 @@ function SquadAssignmentOverlay:init()
frame={t=0, l=13, w=11}, frame={t=0, l=13, w=11},
options={ options={
{label='any ranged', value=sort_noop}, {label='any ranged', value=sort_noop},
{label='any ranged'..CH_DN, value=SORT_FNS.sort_by_any_ranged_desc}, {label='any ranged'..CH_DN, value=SORT_FNS.sort_by_any_ranged_desc, pen=COLOR_GREEN},
{label='any ranged'..CH_UP, value=SORT_FNS.sort_by_any_ranged_asc}, {label='any ranged'..CH_UP, value=SORT_FNS.sort_by_any_ranged_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_any_ranged'), on_change=self:callback('refresh_list', 'sort_any_ranged'),
@ -290,8 +290,8 @@ function SquadAssignmentOverlay:init()
frame={t=0, l=27, w=11}, frame={t=0, l=27, w=11},
options={ options={
{label='leadership', value=sort_noop}, {label='leadership', value=sort_noop},
{label='leadership'..CH_DN, value=SORT_FNS.sort_by_leadership_desc}, {label='leadership'..CH_DN, value=SORT_FNS.sort_by_leadership_desc, pen=COLOR_GREEN},
{label='leadership'..CH_UP, value=SORT_FNS.sort_by_leadership_asc}, {label='leadership'..CH_UP, value=SORT_FNS.sort_by_leadership_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_leadership'), on_change=self:callback('refresh_list', 'sort_leadership'),
@ -301,8 +301,8 @@ function SquadAssignmentOverlay:init()
frame={t=0, l=41, w=5}, frame={t=0, l=41, w=5},
options={ options={
{label='name', value=sort_noop}, {label='name', value=sort_noop},
{label='name'..CH_DN, value=sort_by_name_desc}, {label='name'..CH_DN, value=sort_by_name_desc, pen=COLOR_GREEN},
{label='name'..CH_UP, value=sort_by_name_asc}, {label='name'..CH_UP, value=sort_by_name_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_name'), on_change=self:callback('refresh_list', 'sort_name'),
@ -312,74 +312,74 @@ function SquadAssignmentOverlay:init()
frame={t=0, l=48, w=13}, frame={t=0, l=48, w=13},
options={ options={
{label='migrant wave', value=sort_noop}, {label='migrant wave', value=sort_noop},
{label='migrant wave'..CH_DN, value=sort_by_migrant_wave_desc}, {label='migrant wave'..CH_DN, value=sort_by_migrant_wave_desc, pen=COLOR_GREEN},
{label='migrant wave'..CH_UP, value=sort_by_migrant_wave_asc}, {label='migrant wave'..CH_UP, value=sort_by_migrant_wave_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_migrant_wave'), on_change=self:callback('refresh_list', 'sort_migrant_wave'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_axe', view_id='sort_axe',
frame={t=2, l=0, w=4}, frame={t=2, l=2, w=4},
options={ options={
{label='axe', value=sort_noop}, {label='axe', value=sort_noop},
{label='axe'..CH_DN, value=SORT_FNS.sort_by_axe_desc}, {label='axe'..CH_DN, value=SORT_FNS.sort_by_axe_desc, pen=COLOR_GREEN},
{label='axe'..CH_UP, value=SORT_FNS.sort_by_axe_asc}, {label='axe'..CH_UP, value=SORT_FNS.sort_by_axe_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_axe'), on_change=self:callback('refresh_list', 'sort_axe'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_sword', view_id='sort_sword',
frame={t=2, l=7, w=6}, frame={t=2, l=9, w=6},
options={ options={
{label='sword', value=sort_noop}, {label='sword', value=sort_noop},
{label='sword'..CH_DN, value=SORT_FNS.sort_by_sword_desc}, {label='sword'..CH_DN, value=SORT_FNS.sort_by_sword_desc, pen=COLOR_GREEN},
{label='sword'..CH_UP, value=SORT_FNS.sort_by_sword_asc}, {label='sword'..CH_UP, value=SORT_FNS.sort_by_sword_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_sword'), on_change=self:callback('refresh_list', 'sort_sword'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_mace', view_id='sort_mace',
frame={t=2, l=16, w=5}, frame={t=2, l=18, w=5},
options={ options={
{label='mace', value=sort_noop}, {label='mace', value=sort_noop},
{label='mace'..CH_DN, value=SORT_FNS.sort_by_mace_desc}, {label='mace'..CH_DN, value=SORT_FNS.sort_by_mace_desc, pen=COLOR_GREEN},
{label='mace'..CH_UP, value=SORT_FNS.sort_by_mace_asc}, {label='mace'..CH_UP, value=SORT_FNS.sort_by_mace_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_mace'), on_change=self:callback('refresh_list', 'sort_mace'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_hammer', view_id='sort_hammer',
frame={t=2, l=23, w=7}, frame={t=2, l=25, w=7},
options={ options={
{label='hammer', value=sort_noop}, {label='hammer', value=sort_noop},
{label='hammer'..CH_DN, value=SORT_FNS.sort_by_hammer_desc}, {label='hammer'..CH_DN, value=SORT_FNS.sort_by_hammer_desc, pen=COLOR_GREEN},
{label='hammer'..CH_UP, value=SORT_FNS.sort_by_hammer_asc}, {label='hammer'..CH_UP, value=SORT_FNS.sort_by_hammer_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_hammer'), on_change=self:callback('refresh_list', 'sort_hammer'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_spear', view_id='sort_spear',
frame={t=2, l=34, w=6}, frame={t=2, l=36, w=6},
options={ options={
{label='spear', value=sort_noop}, {label='spear', value=sort_noop},
{label='spear'..CH_DN, value=SORT_FNS.sort_by_spear_desc}, {label='spear'..CH_DN, value=SORT_FNS.sort_by_spear_desc, pen=COLOR_GREEN},
{label='spear'..CH_UP, value=SORT_FNS.sort_by_spear_asc}, {label='spear'..CH_UP, value=SORT_FNS.sort_by_spear_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_spear'), on_change=self:callback('refresh_list', 'sort_spear'),
}, },
widgets.CycleHotkeyLabel{ widgets.CycleHotkeyLabel{
view_id='sort_crossbow', view_id='sort_crossbow',
frame={t=2, l=43, w=9}, frame={t=2, l=45, w=9},
options={ options={
{label='crossbow', value=sort_noop}, {label='crossbow', value=sort_noop},
{label='crossbow'..CH_DN, value=SORT_FNS.sort_by_crossbow_desc}, {label='crossbow'..CH_DN, value=SORT_FNS.sort_by_crossbow_desc, pen=COLOR_GREEN},
{label='crossbow'..CH_UP, value=SORT_FNS.sort_by_crossbow_asc}, {label='crossbow'..CH_UP, value=SORT_FNS.sort_by_crossbow_asc, pen=COLOR_YELLOW},
}, },
option_gap=0, option_gap=0,
on_change=self:callback('refresh_list', 'sort_crossbow'), on_change=self:callback('refresh_list', 'sort_crossbow'),