-
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.
This PR adds the SGBFontManager, which is a super simple system to manage overriding the font that SGB uses.
- Loading branch information
Showing
3 changed files
with
52 additions
and
5 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,29 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace BobboNet.SGB.IMod | ||
{ | ||
public static class SGBFontManager | ||
{ | ||
// | ||
// Properties | ||
// | ||
|
||
/// <summary> | ||
/// The current font that SGB should use. By default this is whatever the first font with the name "font.ttf" | ||
/// is found in the resource folder. | ||
/// </summary> | ||
public static Font CurrentFont { get; set; } | ||
|
||
// | ||
// Init | ||
// | ||
|
||
static SGBFontManager() | ||
{ | ||
// Load the default font | ||
CurrentFont = Resources.Load<Font>("font"); | ||
} | ||
} | ||
} |
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