From 6dac51795e5672f32bba787c0f011cb01e464a96 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 22 Mar 2023 16:58:22 +0000 Subject: 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. --- rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rect.c') diff --git a/rect.c b/rect.c index 535b007..1dffacb 100644 --- a/rect.c +++ b/rect.c @@ -2206,7 +2206,7 @@ static game_ui *new_ui(const game_state *state) reset_ui(ui); ui->erasing = false; ui->cur_x = ui->cur_y = 0; - ui->cur_visible = false; + ui->cur_visible = getenv_bool("PUZZLES_SHOW_CURSOR", false); ui->cur_dragging = false; return ui; } -- cgit v1.1