let mouse clicks change active photo
This commit is contained in:
parent
5194fec400
commit
95397087d2
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…
Reference in New Issue
Block a user