put some spacing betwene tool status and toasts
This commit is contained in:
parent
f306fc3bc9
commit
45027ec8b9
18
Program.cs
18
Program.cs
@ -88,7 +88,6 @@ public class Transform {
|
|||||||
public interface ITool {
|
public interface ITool {
|
||||||
ToolStatus HandleInput(KeyboardState input, MouseState mouse, Transform transform, Game game, Photo photo, UiGeometry geometry);
|
ToolStatus HandleInput(KeyboardState input, MouseState mouse, Transform transform, Game game, Photo photo, UiGeometry geometry);
|
||||||
string Status();
|
string Status();
|
||||||
void Draw(UiGeometry geometry, Game game);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewTool : ITool {
|
public class ViewTool : ITool {
|
||||||
@ -114,9 +113,6 @@ public class ViewTool : ITool {
|
|||||||
public string Status() {
|
public string Status() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw(UiGeometry geometry, Game game) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -252,9 +248,6 @@ public class CropTool : ITool {
|
|||||||
return (left, right, top, bottom);
|
return (left, right, top, bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw(UiGeometry geometry, Game game) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Status() {
|
public string Status() {
|
||||||
return "[crop] " + status;
|
return "[crop] " + status;
|
||||||
}
|
}
|
||||||
@ -292,9 +285,6 @@ public class StraightenTool : ITool {
|
|||||||
return ToolStatus.Active;
|
return ToolStatus.Active;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw(UiGeometry geometry, Game game) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Status() {
|
public string Status() {
|
||||||
return String.Format("[straighten] {0}", photo.Rotation);
|
return String.Format("[straighten] {0}", photo.Rotation);
|
||||||
}
|
}
|
||||||
@ -958,8 +948,6 @@ public class Game : GameWindow {
|
|||||||
DrawText("No photos found.", 10, 10);
|
DrawText("No photos found.", 10, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
activeTool.Draw(geometry, this);
|
|
||||||
|
|
||||||
SwapBuffers();
|
SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1027,7 +1015,11 @@ public class Game : GameWindow {
|
|||||||
|
|
||||||
// Second line.
|
// Second line.
|
||||||
y += 20;
|
y += 20;
|
||||||
DrawText(activeTool.Status() + toast.Get(), geometry.StatusBox.Min.X, y);
|
string status = activeTool.Status();
|
||||||
|
if (status.Length != 0) {
|
||||||
|
status += " ";
|
||||||
|
}
|
||||||
|
DrawText(status + toast.Get(), geometry.StatusBox.Min.X, y);
|
||||||
DrawText(String.Format("FPS: {0,2}", fpsCounter.Fps), geometry.StatusBox.Max.X - 66, y);
|
DrawText(String.Format("FPS: {0,2}", fpsCounter.Fps), geometry.StatusBox.Max.X - 66, y);
|
||||||
if (activePhoto.Loaded) {
|
if (activePhoto.Loaded) {
|
||||||
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Max.X - 136, y);
|
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Max.X - 136, y);
|
||||||
|
Loading…
Reference in New Issue
Block a user