add keybindings for rating

This commit is contained in:
Colin McMillen 2023-07-26 15:41:53 -04:00
parent 247d6ac6f2
commit 42ea309794

View File

@ -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;
}
}