This commit is contained in:
XDrake99 2016-12-03 16:37:22 +01:00
parent c37b7528c9
commit 09387176bb
3 changed files with 15 additions and 2 deletions

Binary file not shown.

View File

@ -50,4 +50,15 @@ public class MathematicalSymbols {
public static String[] genericSyntax() {
return new String[] { SYSTEM, EQUATION };
}
public static String getGraphicRepresentation(String string) {
return string
.replace("", "^")
.replace("", "SIN")
.replace("", "COS")
.replace("", "TAN")
.replace("", "SIN-1")
.replace("", "COS-1")
.replace("", "TAN-1");
}
}

View File

@ -157,7 +157,7 @@ public class EquationScreen extends Screen {
final int textColor = 0xFF000000;
final int padding = 4;
glColor(textColor);
final String inputText = nuovaEquazione.substring(0, caretPos)+(showCaret?"|":"")+nuovaEquazione.substring(((showCaret==false||nuovaEquazione.length()<=caretPos)?caretPos:caretPos+1), nuovaEquazione.length());
final String inputText = MathematicalSymbols.getGraphicRepresentation(nuovaEquazione.substring(0, caretPos)+(showCaret?"|":"")+nuovaEquazione.substring(((showCaret==false||nuovaEquazione.length()<=caretPos)?caretPos:caretPos+1), nuovaEquazione.length()));
final boolean tooLongI = padding+glGetStringWidth(fontBig, nuovaEquazione)+padding >= Main.screenSize[0];
int scrollI = 0;
if (tooLongI) {
@ -415,7 +415,9 @@ public class EquationScreen extends Screen {
caretPos = 0;
nuovaEquazione="";
afterDoNextStep = false;
f.clear();
if (f != null) {
f.clear();
}
return true;
}
case SURD_MODE: