remove SetActivePhoto() functions

This commit is contained in:
Colin McMillen 2023-08-03 23:33:48 -04:00
parent 086088fb4c
commit 2a28f94dc1

View File

@ -62,7 +62,6 @@ public enum ToolState {
public interface ITool {
void SetActivePhoto(Photo photo);
ToolState HandleInput(UiGeometry geometry, KeyboardState input, MouseState mouse, Game game);
string Status();
void Draw(UiGeometry geometry, Game game);
@ -70,12 +69,6 @@ public interface ITool {
public class ViewTool : ITool {
Photo? activePhoto;
public void SetActivePhoto(Photo photo) {
activePhoto = photo;
}
public ToolState HandleInput(UiGeometry geometry, KeyboardState input, MouseState mouse, Game game) {
return ToolState.Active;
}
@ -101,14 +94,6 @@ public class CropTool : ITool {
activePhoto = photo;
}
public void SetActivePhoto(Photo photo) {
if (photo != activePhoto) {
mouseDragStart = Vector2i.Zero;
mouseDragEnd = Vector2i.Zero;
}
activePhoto = photo;
}
public ToolState HandleInput(UiGeometry geometry, KeyboardState input, MouseState mouse, Game game) {
Vector2i mousePosition = (Vector2i) mouse.Position;
Vector2i imagePosition = game.ScreenToImage(mousePosition);