mirror of
https://github.com/DarkStore-3DS/Universal-Core.git
synced 2026-07-03 00:39:23 +00:00
Flip < and > in RTL too
This commit is contained in:
+22
-8
@@ -287,14 +287,28 @@ ITCM_CODE void Font::print(std::u16string_view text, int x, int y, bool top, int
|
||||
|
||||
// Brackets are flipped in RTL
|
||||
if(rtl) {
|
||||
if(*it == '(')
|
||||
index = charIndex(')');
|
||||
else if(*it == ')')
|
||||
index = charIndex('(');
|
||||
else if(*it == '[')
|
||||
index = charIndex(']');
|
||||
else if(*it == ']')
|
||||
index = charIndex('[');
|
||||
switch(*it) {
|
||||
case '(':
|
||||
index = getCharIndex(')');
|
||||
break;
|
||||
case ')':
|
||||
index = getCharIndex('(');
|
||||
break;
|
||||
case '[':
|
||||
index = getCharIndex(']');
|
||||
break;
|
||||
case ']':
|
||||
index = getCharIndex('[');
|
||||
break;
|
||||
case '<':
|
||||
index = getCharIndex('>');
|
||||
break;
|
||||
case '>':
|
||||
index = getCharIndex('<');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(sprite) {
|
||||
|
||||
Reference in New Issue
Block a user