From ac93b556097d5f14e5ee30dbe6caea97583d1fc3 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Mon, 31 Jul 2023 00:58:21 -0400 Subject: [PATCH] change Export to shift-P --- Program.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index 47f95e5..ad3e86f 100644 --- a/Program.cs +++ b/Program.cs @@ -622,6 +622,9 @@ public class Game : GameWindow { KeyboardState input = KeyboardState; + bool shiftIsDown = input.IsKeyDown(Keys.LeftShift) || input.IsKeyDown(Keys.RightShift); + bool ctrlIsDown = input.IsKeyDown(Keys.LeftControl) || input.IsKeyDown(Keys.RightControl); + // FIXME: add a confirm dialog before closing. (Also for the window-close button.) // Close when Escape is pressed. if (input.IsKeyPressed(Keys.Escape)) { @@ -687,7 +690,7 @@ public class Game : GameWindow { photoIndex -= 5; } - if (input.IsKeyPressed(Keys.X)) { + if (input.IsKeyPressed(Keys.P) && shiftIsDown) { ExportPhotos(); } @@ -728,8 +731,7 @@ public class Game : GameWindow { } if (rating >= 0) { - bool shifted = input.IsKeyDown(Keys.LeftShift) || input.IsKeyDown(Keys.RightShift); - if (shifted) { + if (shiftIsDown) { FilterByRating(rating); } else { if (photos.Count > 0) {