Browse Source

let mouse clicks change active photo

main
Colin McMillen 1 year ago
parent
commit
95397087d2
  1. 11
      Program.cs

11
Program.cs

@ -245,6 +245,17 @@ public class Game : GameWindow {
KeyboardState input = KeyboardState;
if (MouseState.IsButtonPressed(0)) {
for (int i = 0; i < geometry.ThumbnailBoxes.Count; i++) {
Box2i box = geometry.ThumbnailBoxes[i];
if (box.ContainsInclusive((Vector2i) MouseState.Position)) {
if (0 <= i && i < textures.Count) {
textureIndex = i;
}
}
}
}
if (input.IsKeyDown(Keys.Escape)) {
Close();
}

Loading…
Cancel
Save