Compare commits
2 Commits
3012f67c9f
...
f83d7f13aa
Author | SHA1 | Date | |
---|---|---|---|
f83d7f13aa | |||
a92d089c5b |
10
Program.cs
10
Program.cs
@ -19,7 +19,7 @@ using System.Xml.Linq;
|
||||
namespace SemiColinGames;
|
||||
|
||||
public class FpsCounter {
|
||||
private readonly int[] frameTimes = new int[60];
|
||||
private readonly int[] frameTimes = new int[30];
|
||||
private double fps = 0;
|
||||
private int idx = 0;
|
||||
|
||||
@ -504,6 +504,7 @@ public static class Util {
|
||||
return texture;
|
||||
}
|
||||
|
||||
// FIXME: make a real icon stored as a PNG...
|
||||
public static OpenTK.Windowing.Common.Input.Image[] RenderAppIcon() {
|
||||
int size = 64;
|
||||
Font font = SystemFonts.CreateFont("MS Mincho", size, FontStyle.Bold);
|
||||
@ -803,11 +804,12 @@ public class Game : GameWindow {
|
||||
}
|
||||
|
||||
// Draw status box.
|
||||
int statusPadding = 2;
|
||||
DrawFilledBox(geometry.StatusBox, Color4.Black);
|
||||
DrawText(activePhoto.Description(), geometry.StatusBox.Min.X + 80, geometry.StatusBox.Min.Y);
|
||||
DrawText($" FPS: {fpsCounter.Fps}", geometry.StatusBox.Max.X - 76, geometry.StatusBox.Min.Y);
|
||||
DrawText(activePhoto.Description(), geometry.StatusBox.Min.X + 80, geometry.StatusBox.Min.Y + statusPadding);
|
||||
DrawText($" FPS: {fpsCounter.Fps}", geometry.StatusBox.Max.X - 76, geometry.StatusBox.Min.Y + statusPadding);
|
||||
if (activePhoto.Loaded) {
|
||||
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Min.X, geometry.StatusBox.Min.Y);
|
||||
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Min.X, geometry.StatusBox.Min.Y + statusPadding);
|
||||
}
|
||||
|
||||
SwapBuffers();
|
||||
|
Loading…
Reference in New Issue
Block a user