Browse Source

add keybindings for rating

main
Colin McMillen 12 months ago
parent
commit
42ea309794
  1. 34
      Program.cs

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

Loading…
Cancel
Save