Skip to content

Commit

Permalink
Pressing escape now unselects the selected text input.
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegratedQuantum committed Jun 11, 2024
1 parent 1296828 commit df0e809
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ fn logToStdErr(comptime format: []const u8, args: anytype) void {
}

fn escape() void {
if(gui.selectedTextInput != null) {
gui.selectedTextInput = null;
return;
}
if(game.world == null) return;
gui.toggleGameMenu();
}
Expand Down

0 comments on commit df0e809

Please sign in to comment.