Allow specifiying a font region

This commit is contained in:
Pk11
2021-03-19 16:39:48 -05:00
parent 0b0f88eb59
commit cc53b7d72b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float
Contains initializing Citro2D, Citro3D and the screen targets. Contains initializing Citro2D, Citro3D and the screen targets.
Call this when initing the app. Call this when initing the app.
*/ */
Result Gui::init(void) { Result Gui::init(CFG_Region fontRegion) {
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE); C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
C2D_Init(C2D_DEFAULT_MAX_OBJECTS); C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
C2D_Prepare(); C2D_Prepare();
@@ -86,7 +86,7 @@ Result Gui::init(void) {
/* Load Textbuffer. */ /* Load Textbuffer. */
TextBuf = C2D_TextBufNew(4096); TextBuf = C2D_TextBufNew(4096);
Font = C2D_FontLoadSystem(CFG_REGION_USA); // Load System font. Font = C2D_FontLoadSystem(fontRegion); // Load System font.
return 0; return 0;
} }
+1 -1
View File
@@ -54,7 +54,7 @@ namespace Gui {
Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer. Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer.
call this when initializing. call this when initializing.
*/ */
Result init(void); Result init(CFG_Region fontRegion = CFG_REGION_USA);
/* /*
Load a Font. (BCFNT) Load a Font. (BCFNT)