diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-03-22 16:58:22 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-03-22 16:58:22 +0000 |
| commit | 6dac51795e5672f32bba787c0f011cb01e464a96 (patch) | |
| tree | 2018973bd3b6451491af85784566917563c16a44 /map.c | |
| parent | 09c15f206edac18bd2158c189c821b9ba85d3939 (diff) | |
| download | puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.zip puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.gz puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.bz2 puzzles-6dac51795e5672f32bba787c0f011cb01e464a96.tar.xz | |
Add an environment variable to control initial cursor visibility
If you define PUZZLES_INITIAL_CURSOR=y, puzzles that have a keyboard
cursor will default to making it visible rather than invisible at the
start of a new game. Behaviour is otherwise the same, so mouse actions
will cause the cursor to vanish and keyboard actions will cause it to
appear. It's just the default that has changed.
The purpose of this is for use on devices and platforms where the
primary or only means of interaction is keyboard-based. In those cases,
starting with the keyboard cursor invisible is weird and a bit
confusing.
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2287,7 +2287,7 @@ static game_ui *new_ui(const game_state *state) ui->drag_pencil = 0; ui->show_numbers = false; ui->cur_x = ui->cur_y = 0; - ui->cur_visible = false; + ui->cur_visible = getenv_bool("PUZZLES_SHOW_CURSOR", false); ui->cur_moved = false; ui->cur_lastmove = 0; return ui; |