Skip to content

add prefer nicknamed #1430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Template for new versions:
## New Tools

## New Features
- `gui/spectate`: added "Prefer nicknamed" to the list of options

## Fixes
- `list-agreements`: fix date math when determining petition age
Expand Down
29 changes: 15 additions & 14 deletions gui/spectate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end
Spectate = defclass(Spectate, widgets.Window)
Spectate.ATTRS {
frame_title='Spectate',
frame={l=5, t=5, w=36, h=41},
frame={l=5, t=5, w=36, h=42},
}

local function create_toggle_button(frame, cfg_elem, hotkey, label, cfg_elem_key)
Expand Down Expand Up @@ -199,36 +199,37 @@ function Spectate:init()
create_toggle_button({t=11}, 'include-wildlife', 'CUSTOM_ALT_W', rpad('Include wildlife', lWidth)),
create_toggle_button({t=12}, 'prefer-conflict', 'CUSTOM_ALT_B', rpad('Prefer conflict', lWidth)),
create_toggle_button({t=13}, 'prefer-new-arrivals', 'CUSTOM_ALT_N', rpad('Prefer new arrivals', lWidth)),
create_toggle_button({t=14}, 'prefer-nicknamed', 'CUSTOM_ALT_I', rpad('Prefer nicknamed', lWidth)),
widgets.Divider{
frame={t=15, h=1},
frame={t=16, h=1},
frame_style=gui.FRAME_THIN,
frame_style_l=false,
frame_style_r=false,
},
widgets.Label{
frame={t=17, l=0},
frame={t=18, l=0},
text="Tooltips:"
},
ToggleLabel{
frame={t=17, l=12},
frame={t=18, l=12},
initial_option=overlay.isOverlayEnabled(OVERLAY_NAME),
on_change=function(val) dfhack.run_command('overlay', val and 'enable' or 'disable', OVERLAY_NAME) end,
key='CUSTOM_ALT_O',
label="Overlay ",
},
widgets.Label{
frame={t=19, l=colFollow},
frame={t=20, l=colFollow},
text='Follow',
},
widgets.Label{
frame={t=19, l=colHover},
frame={t=20, l=colHover},
text='Hover',
},
create_row({t=21}, 'Enabled', 'E', '', colFollow, colHover),
create_row({t=22}, 'Enabled', 'E', '', colFollow, colHover),

create_numeric_edit_field({t=23}, 'tooltip-follow-blink-milliseconds', 'CUSTOM_B', 'Blink period (ms): '),
create_numeric_edit_field({t=24}, 'tooltip-follow-blink-milliseconds', 'CUSTOM_B', 'Blink period (ms): '),
widgets.CycleHotkeyLabel{
frame={t=24},
frame={t=25},
key='CUSTOM_C',
label="Hold to show:",
options={
Expand All @@ -241,11 +242,11 @@ function Spectate:init()
on_change=function(new, _) dfhack.run_command('spectate', 'set', 'tooltip-follow-hold-to-show', new) end
},

create_row({t=26}, 'Job', 'J', 'job', colFollow, colHover),
create_row({t=27}, 'Activity', 'A', 'activity', colFollow, colHover),
create_row({t=28}, 'Name', 'N', 'name', colFollow, colHover),
create_row({t=29}, 'Stress', 'S', 'stress', colFollow, colHover),
create_stress_list({t=30}, colFollow, colHover),
create_row({t=27}, 'Job', 'J', 'job', colFollow, colHover),
create_row({t=28}, 'Activity', 'A', 'activity', colFollow, colHover),
create_row({t=29}, 'Name', 'N', 'name', colFollow, colHover),
create_row({t=30}, 'Stress', 'S', 'stress', colFollow, colHover),
create_stress_list({t=31}, colFollow, colHover),
}
end

Expand Down