Skip to content

Commit 79fecaf

Browse files
author
Kenox
committed
Font Blurry Fix
1 parent c025224 commit 79fecaf

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

SFML-Sprite-Anim/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static class Program
1717
static void Main()
1818
{
1919
// INITIALIZING WINDOW
20-
RenderWindow renderWindow = new RenderWindow(new VideoMode(800, 600), "www.github.com/kenuux - SFML Learning Purpose - Sprite Movement/Animation", Styles.Close, new ContextSettings(32, 0, 8));
20+
RenderWindow renderWindow = new RenderWindow(new VideoMode(800, 600), "www.github.com/kenuux - SFML Learning Purpose - Sprite Movement/Animation", Styles.Close, new ContextSettings(32, 0, 0));
2121
renderWindow.SetFramerateLimit(60);
2222
renderWindow.Closed += RenderWindow_Closed;
2323

SFML-Sprite-Anim/characters/Character.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum WalkingIndex
1515
IDLE, WALK
1616
}
1717

18-
class Character
18+
class Character : IDisposable
1919
{
2020
public Sprite sprite { get; }
2121
private Vector2f pos;
@@ -61,6 +61,7 @@ public void Update(float dt)
6161
// CHAR LABEL
6262
text.Origin = new Vector2f(text.GetLocalBounds().Width / 2, sprite.GetLocalBounds().Height / 2);
6363
text.Position = new Vector2f((int)sprite.Position.X, (int)sprite.Position.Y - 100);
64+
text.Scale = new Vector2f(0.9f, 0.9f);
6465
}
6566

6667
private void SetDirection(Vector2f dir)
@@ -101,6 +102,13 @@ public void HandleInput(RenderWindow renderWindow)
101102
}
102103
SetDirection(dir);
103104
}
105+
106+
public void Dispose()
107+
{
108+
font.Dispose();
109+
text.Dispose();
110+
sprite.Dispose();
111+
}
104112
}
105113
}
106114

0 commit comments

Comments
 (0)