Browse Source

rotate by 0.1 degrees per keypress

main
Colin McMillen 7 months ago
parent
commit
0417c354d5
  1. 10
      Program.cs

10
Program.cs

@ -266,11 +266,11 @@ public class StraightenTool : ITool {
public ToolStatus HandleInput(KeyboardState input, MouseState mouse, Transform transform, Game game, Photo photo, UiGeometry geometry) {
if (input.IsKeyPressed(Keys.Left)) {
photo.RotationDegrees += 5;
photo.RotationDegrees += .1f;
}
if (input.IsKeyPressed(Keys.Right)) {
photo.RotationDegrees -= 5;
photo.RotationDegrees -= .1f;
}
if (input.IsKeyPressed(Keys.Enter)) {
@ -286,7 +286,7 @@ public class StraightenTool : ITool {
}
public string Status() {
return String.Format("[straighten] {0}", photo.RotationDegrees);
return String.Format("[straighten] {0:F2}", photo.RotationDegrees);
}
}
@ -789,9 +789,9 @@ public class Game : GameWindow {
// Load photos from a directory.
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\photos-test\");
// string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\07\14\");
// string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\09\06\jpg");
string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\09\06\jpg");
// string[] files = Directory.GetFiles(@"G:\DCIM\100EOSR6\");
string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\08\03");
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\totte-output\2023\08\03");
// string[] files = Directory.GetFiles(@"c:\users\colin\desktop\export");
// string[] files = Directory.GetFiles(@"C:\Users\colin\Pictures\photos\2018\06\23");
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\104D7000");

Loading…
Cancel
Save