-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code improvements for splash screen and version handling
- Loading branch information
1 parent
39e1c70
commit f3b0582
Showing
10 changed files
with
139 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using LittleWarGameClient.Properties; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing.Text; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using static nud2dlib.Windows.Forms.Win32; | ||
|
||
namespace LittleWarGameClient | ||
{ | ||
internal class FontManager | ||
{ | ||
private static FontFamily? gameFont; | ||
internal static FontFamily lwgFont | ||
{ | ||
get | ||
{ | ||
if (gameFont == null) | ||
{ | ||
string font_filename = "lwgFont.ttf"; | ||
if (!File.Exists(font_filename)) | ||
File.WriteAllBytes(font_filename, Resources.LcdSolidFont); | ||
PrivateFontCollection pfc = new(); | ||
pfc.AddFontFile(font_filename); | ||
gameFont = pfc.Families[0]; | ||
} | ||
return gameFont; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters