mirror of
https://github.com/DarkStore-3DS/Universal-Core.git
synced 2026-07-06 08:49:06 +00:00
Add GUI reinit
This commit is contained in:
@@ -105,6 +105,15 @@ void Gui::exit(void) {
|
|||||||
if (usedScreen != nullptr) usedScreen = nullptr;
|
if (usedScreen != nullptr) usedScreen = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reinitialize GUI.
|
||||||
|
Result Gui::reinit(void) {
|
||||||
|
C2D_TextBufDelete(TextBuf);
|
||||||
|
C2D_Fini();
|
||||||
|
C3D_Fini();
|
||||||
|
|
||||||
|
return init();
|
||||||
|
}
|
||||||
|
|
||||||
// Draw a Centered String.
|
// Draw a Centered String.
|
||||||
void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt) {
|
void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt) {
|
||||||
float lineHeight, widthScale;
|
float lineHeight, widthScale;
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ namespace Gui {
|
|||||||
// Exit the GUI. (Call this at exit.)
|
// Exit the GUI. (Call this at exit.)
|
||||||
void exit(void);
|
void exit(void);
|
||||||
|
|
||||||
|
// Reinit the GUI.
|
||||||
|
Result reinit(void);
|
||||||
|
|
||||||
/* Draws a centered String.
|
/* Draws a centered String.
|
||||||
* x: The X Offset from center. (Center: 200 px on top, 160 px on Bottom.)
|
* x: The X Offset from center. (Center: 200 px on top, 160 px on Bottom.)
|
||||||
* y: The Y Position of the Text.
|
* y: The Y Position of the Text.
|
||||||
|
|||||||
Reference in New Issue
Block a user