|
46 | 46 | Spectate = defclass(Spectate, widgets.Window) |
47 | 47 | Spectate.ATTRS { |
48 | 48 | frame_title='Spectate', |
49 | | - frame={l=5, t=5, w=36, h=39}, |
| 49 | + frame={l=5, t=5, w=36, h=40}, |
50 | 50 | } |
51 | 51 |
|
52 | 52 | local function create_toggle_button(frame, cfg_elem, hotkey, label, cfg_elem_key) |
@@ -225,11 +225,26 @@ function Spectate:init() |
225 | 225 | text='Hover', |
226 | 226 | }, |
227 | 227 | create_row({t=21}, 'Enabled', 'E', '', colFollow, colHover), |
| 228 | + |
228 | 229 | create_numeric_edit_field({t=23}, 'tooltip-follow-blink-milliseconds', 'CUSTOM_B', 'Blink period (ms): '), |
229 | | - create_row({t=25}, 'Job', 'J', 'job', colFollow, colHover), |
230 | | - create_row({t=26}, 'Name', 'N', 'name', colFollow, colHover), |
231 | | - create_row({t=27}, 'Stress', 'S', 'stress', colFollow, colHover), |
232 | | - create_stress_list({t=28}, colFollow, colHover), |
| 230 | + widgets.CycleHotkeyLabel{ |
| 231 | + frame={t=24}, |
| 232 | + key='CUSTOM_C', |
| 233 | + label="Hold to show:", |
| 234 | + options={ |
| 235 | + {label="None", value="none", pen=COLOR_GREY}, |
| 236 | + {label="Ctrl", value="ctrl", pen=COLOR_LIGHTCYAN}, |
| 237 | + {label="Alt", value="alt", pen=COLOR_LIGHTCYAN}, |
| 238 | + {label="Shift", value="shift", pen=COLOR_LIGHTCYAN}, |
| 239 | + }, |
| 240 | + initial_option=spectate.get_config_elem('tooltip-follow-hold-to-show'), |
| 241 | + on_change=function(new, _) dfhack.run_command('spectate', 'set', 'tooltip-follow-hold-to-show', new) end |
| 242 | + }, |
| 243 | + |
| 244 | + create_row({t=26}, 'Job', 'J', 'job', colFollow, colHover), |
| 245 | + create_row({t=27}, 'Name', 'N', 'name', colFollow, colHover), |
| 246 | + create_row({t=28}, 'Stress', 'S', 'stress', colFollow, colHover), |
| 247 | + create_stress_list({t=29}, colFollow, colHover), |
233 | 248 | } |
234 | 249 | end |
235 | 250 |
|
|
0 commit comments