mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Fix centered draws without a max width
(probably ;P)
This commit is contained in:
+1
-1
@@ -156,7 +156,7 @@ void Gui::DisplayWarnMsg(std::string Text)
|
||||
}
|
||||
|
||||
void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth) {
|
||||
Gui::DrawString((currentScreen ? 200 : 160)+x-(std::min(maxWidth, (int)Gui::GetStringWidth(size, Text))/2), y, size, color, Text, maxWidth);
|
||||
Gui::DrawString((currentScreen ? 200 : 160)+x-((maxWidth == 0 ? (int)Gui::GetStringWidth(size, Text) : std::min(maxWidth, (int)Gui::GetStringWidth(size, Text)))/2), y, size, color, Text, maxWidth);
|
||||
}
|
||||
|
||||
// Draw String or Text.
|
||||
|
||||
Reference in New Issue
Block a user