From cc53b7d72b6117cb9b99a6e81db0c508e1bd648a Mon Sep 17 00:00:00 2001 From: Pk11 Date: Fri, 19 Mar 2021 16:39:48 -0500 Subject: [PATCH] Allow specifiying a font region --- gui.cpp | 4 ++-- gui.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui.cpp b/gui.cpp index b41b3a4..3af6875 100644 --- a/gui.cpp +++ b/gui.cpp @@ -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. Call this when initing the app. */ -Result Gui::init(void) { +Result Gui::init(CFG_Region fontRegion) { C3D_Init(C3D_DEFAULT_CMDBUF_SIZE); C2D_Init(C2D_DEFAULT_MAX_OBJECTS); C2D_Prepare(); @@ -86,7 +86,7 @@ Result Gui::init(void) { /* Load Textbuffer. */ TextBuf = C2D_TextBufNew(4096); - Font = C2D_FontLoadSystem(CFG_REGION_USA); // Load System font. + Font = C2D_FontLoadSystem(fontRegion); // Load System font. return 0; } diff --git a/gui.hpp b/gui.hpp index 513dcb8..fbe7036 100644 --- a/gui.hpp +++ b/gui.hpp @@ -54,7 +54,7 @@ namespace Gui { Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer. call this when initializing. */ - Result init(void); + Result init(CFG_Region fontRegion = CFG_REGION_USA); /* Load a Font. (BCFNT)