From 42ea3097944b6827a8c083f3fdba78e864fd7f00 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 26 Jul 2023 15:41:53 -0400 Subject: [PATCH] add keybindings for rating --- Program.cs | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Program.cs b/Program.cs index 25bcd06..6bf11b1 100644 --- a/Program.cs +++ b/Program.cs @@ -662,26 +662,50 @@ public class Game : GameWindow { photoIndex = Math.Clamp(photoIndex, 0, photos.Count - 1); if (input.IsKeyDown(Keys.D0) || input.IsKeyDown(Keys.GraveAccent)) { - zoomLevel = 0f; + photos[photoIndex].Rating = 0; } if (input.IsKeyDown(Keys.D1)) { - zoomLevel = 1f; + photos[photoIndex].Rating = 1; } if (input.IsKeyDown(Keys.D2)) { - zoomLevel = 2f; + photos[photoIndex].Rating = 2; } if (input.IsKeyDown(Keys.D3)) { - zoomLevel = 4f; + photos[photoIndex].Rating = 3; } if (input.IsKeyDown(Keys.D4)) { - zoomLevel = 8f; + photos[photoIndex].Rating = 4; } if (input.IsKeyDown(Keys.D5)) { + photos[photoIndex].Rating = 5; + } + + if (input.IsKeyDown(Keys.Q)) { + zoomLevel = 0f; + } + + if (input.IsKeyDown(Keys.W)) { + zoomLevel = 1f; + } + + if (input.IsKeyDown(Keys.E)) { + zoomLevel = 2f; + } + + if (input.IsKeyDown(Keys.R)) { + zoomLevel = 4f; + } + + if (input.IsKeyDown(Keys.T)) { + zoomLevel = 8f; + } + + if (input.IsKeyDown(Keys.Y)) { zoomLevel = 16f; } }