Passing directly the FloatBuffer to the GPU
Completed the keypad key assignments
This commit is contained in:
parent
872bc3f943
commit
d5b34941bd
@ -2,8 +2,8 @@ package org.warp.picalculator;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.device.KeyboardEventListener;
|
import org.warp.picalculator.device.KeyboardEventListener;
|
||||||
import org.warp.picalculator.gui.expression.InputContext;
|
import org.warp.picalculator.gui.expression.InputContext;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockContainer;
|
import org.warp.picalculator.gui.expression.blocks.BlockContainer;
|
||||||
@ -99,7 +99,7 @@ public class TestGPU {
|
|||||||
case RESET:
|
case RESET:
|
||||||
c.clear();
|
c.clear();
|
||||||
return true;
|
return true;
|
||||||
case POWER:
|
case POWEROFF:
|
||||||
d.destroy();
|
d.destroy();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
return true;
|
return true;
|
||||||
|
12
src/main/java/org/warp/picalculator/device/Key.java
Normal file
12
src/main/java/org/warp/picalculator/device/Key.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package org.warp.picalculator.device;
|
||||||
|
|
||||||
|
public enum Key {
|
||||||
|
POWEROFF, debug_DEG, debug_RAD, debug_GRA, SHIFT, ALPHA, NONE, HISTORY_BACK,
|
||||||
|
HISTORY_FORWARD, SURD_MODE, DRG_CYCLE, LETTER_X, LETTER_Y, LETTER_Z, STEP,
|
||||||
|
SIMPLIFY, BRIGHTNESS_CYCLE, BRIGHTNESS_CYCLE_REVERSE, DOT, NUM0, NUM1, NUM2,
|
||||||
|
NUM3, NUM4, NUM5, NUM6, NUM7, NUM8, NUM9, PARENTHESIS_OPEN, PARENTHESIS_CLOSE,
|
||||||
|
PLUS, MINUS, PLUS_MINUS, MULTIPLY, DIVIDE, EQUAL, DELETE, RESET, LEFT, RIGHT,
|
||||||
|
UP, DOWN, OK, debug1, debug2, debug3, debug4, debug5, SQRT, ROOT, POWER_OF_2,
|
||||||
|
POWER_OF_x, SINE, COSINE, TANGENT, ARCSINE, ARCCOSINE, ARCTANGENT, PI, SETTINGS,
|
||||||
|
F1, F2, F3, F4, BACK
|
||||||
|
}
|
@ -101,7 +101,7 @@ public class Keyboard {
|
|||||||
private synchronized static void debugKeyPressed(int keyCode) {
|
private synchronized static void debugKeyPressed(int keyCode) {
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case KeyEvent.VK_ESCAPE:
|
case KeyEvent.VK_ESCAPE:
|
||||||
Keyboard.keyPressed(Key.POWER);
|
Keyboard.keyPressed(Key.POWEROFF);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_S:
|
case KeyEvent.VK_S:
|
||||||
if (Keyboard.shift) {
|
if (Keyboard.shift) {
|
||||||
@ -462,76 +462,76 @@ public class Keyboard {
|
|||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 0,2 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 0,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 0,3 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 0,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 0,4 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 0,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 0,5 */
|
{Key.SETTINGS, Key.NONE, Key.NONE}, /* 0,5 */
|
||||||
{Key.BRIGHTNESS_CYCLE, Key.BRIGHTNESS_CYCLE_REVERSE, Key.NONE}, /* 0,6 */
|
{Key.BRIGHTNESS_CYCLE, Key.BRIGHTNESS_CYCLE_REVERSE, Key.NONE}, /* 0,6 */
|
||||||
{Key.SIMPLIFY, Key.STEP, Key.NONE} /* 0,7 */
|
{Key.SIMPLIFY, Key.STEP, Key.NONE} /* 0,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 1 */
|
{ /* ROW 1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,0 */
|
{Key.F4, Key.F4, Key.F4}, /* 1,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,1 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 1,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,2 */
|
{Key.LEFT, Key.NONE, Key.NONE}, /* 1,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,3 */
|
{Key.OK, Key.NONE, Key.NONE}, /* 1,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,4 */
|
{Key.RIGHT, Key.NONE, Key.NONE}, /* 1,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,5 */
|
{Key.HISTORY_BACK, Key.NONE, Key.NONE}, /* 1,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 1,6 */
|
{Key.HISTORY_FORWARD, Key.NONE, Key.NONE}, /* 1,6 */
|
||||||
{Key.NONE, Key.PI, Key.DRG_CYCLE} /* 1,7 */
|
{Key.NONE, Key.PI, Key.DRG_CYCLE} /* 1,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 2 */
|
{ /* ROW 2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,0 */
|
{Key.F3, Key.F4, Key.F4}, /* 2,0 */
|
||||||
{Key.SQRT, Key.NONE, Key.LETTER_Y}, /* 2,1 */
|
{Key.SQRT, Key.ROOT, Key.NONE}, /* 2,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,2 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 2,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,3 */
|
{Key.DOWN, Key.NONE, Key.NONE}, /* 2,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,4 */
|
{Key.BACK, Key.NONE, Key.NONE}, /* 2,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,5 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 2,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 2,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 2,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 2,7 */
|
{Key.NONE, Key.NONE, Key.LETTER_Z} /* 2,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 3 */
|
{ /* ROW 3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,0 */
|
{Key.F2, Key.F2, Key.F2}, /* 3,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,1 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 3,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,2 */
|
{Key.POWER_OF_x, Key.NONE, Key.NONE}, /* 3,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,3 */
|
{Key.POWER_OF_2, Key.NONE, Key.NONE}, /* 3,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,4 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 3,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,5 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 3,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 3,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 3,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 3,7 */
|
{Key.DOT, Key.NONE, Key.LETTER_Y} /* 3,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 4 */
|
{ /* ROW 4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,0 */
|
{Key.F1, Key.F1, Key.F1}, /* 4,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,1 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 4,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,2 */
|
{Key.PARENTHESIS_OPEN, Key.NONE, Key.NONE}, /* 4,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,3 */
|
{Key.PARENTHESIS_CLOSE, Key.NONE, Key.NONE}, /* 4,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,4 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 4,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,5 */
|
{Key.SURD_MODE, Key.NONE, Key.NONE}, /* 4,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 4,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 4,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 4,7 */
|
{Key.NUM0, Key.NONE, Key.LETTER_X} /* 4,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 5 */
|
{ /* ROW 5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,0 */
|
{Key.NUM7, Key.NONE, Key.NONE}, /* 5,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,1 */
|
{Key.NUM8, Key.NONE, Key.NONE}, /* 5,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,2 */
|
{Key.NUM9, Key.NONE, Key.NONE}, /* 5,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,3 */
|
{Key.DELETE, Key.NONE, Key.NONE}, /* 5,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,4 */
|
{Key.RESET, Key.NONE, Key.NONE}, /* 5,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,5 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 5,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 5,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 5,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 5,7 */
|
{Key.NONE, Key.NONE, Key.NONE} /* 5,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 6 */
|
{ /* ROW 6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,0 */
|
{Key.NUM4, Key.NONE, Key.NONE}, /* 6,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,1 */
|
{Key.NUM5, Key.NONE, Key.NONE}, /* 6,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,2 */
|
{Key.NUM6, Key.NONE, Key.NONE}, /* 6,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,3 */
|
{Key.MULTIPLY, Key.NONE, Key.NONE}, /* 6,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,4 */
|
{Key.DIVIDE, Key.NONE, Key.NONE}, /* 6,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,5 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 6,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 6,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 6,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 6,7 */
|
{Key.NONE, Key.NONE, Key.NONE} /* 6,7 */
|
||||||
},
|
},
|
||||||
{ /* ROW 7 */
|
{ /* ROW 7 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,0 */
|
{Key.NUM1, Key.NONE, Key.NONE}, /* 7,0 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,1 */
|
{Key.NUM2, Key.NONE, Key.NONE}, /* 7,1 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,2 */
|
{Key.NUM3, Key.NONE, Key.NONE}, /* 7,2 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,3 */
|
{Key.PLUS, Key.PLUS_MINUS, Key.NONE}, /* 7,3 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,4 */
|
{Key.MINUS, Key.NONE, Key.NONE}, /* 7,4 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,5 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 7,5 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE}, /* 7,6 */
|
{Key.NONE, Key.NONE, Key.NONE}, /* 7,6 */
|
||||||
{Key.NONE, Key.NONE, Key.NONE} /* 7,7 */
|
{Key.NONE, Key.NONE, Key.NONE} /* 7,7 */
|
||||||
@ -586,7 +586,7 @@ public class Keyboard {
|
|||||||
refresh = true;
|
refresh = true;
|
||||||
} else {
|
} else {
|
||||||
switch (k) {
|
switch (k) {
|
||||||
case POWER:
|
case POWEROFF:
|
||||||
DisplayManager.INSTANCE.engine.destroy();
|
DisplayManager.INSTANCE.engine.destroy();
|
||||||
break;
|
break;
|
||||||
case NONE:
|
case NONE:
|
||||||
@ -678,10 +678,6 @@ public class Keyboard {
|
|||||||
additionalListener = l;
|
additionalListener = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum Key {
|
|
||||||
POWER, debug_DEG, debug_RAD, debug_GRA, SHIFT, ALPHA, NONE, HISTORY_BACK, HISTORY_FORWARD, SURD_MODE, DRG_CYCLE, LETTER_X, LETTER_Y, STEP, SIMPLIFY, BRIGHTNESS_CYCLE, BRIGHTNESS_CYCLE_REVERSE, DOT, NUM0, NUM1, NUM2, NUM3, NUM4, NUM5, NUM6, NUM7, NUM8, NUM9, PARENTHESIS_OPEN, PARENTHESIS_CLOSE, PLUS, MINUS, PLUS_MINUS, MULTIPLY, DIVIDE, EQUAL, DELETE, RESET, LEFT, RIGHT, UP, DOWN, OK, debug1, debug2, debug3, debug4, debug5, SQRT, ROOT, POWER_OF_2, POWER_OF_x, SINE, COSINE, TANGENT, ARCSINE, ARCCOSINE, ARCTANGENT, PI
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean popRefreshRequest() {
|
public static boolean popRefreshRequest() {
|
||||||
if (refreshRequest) {
|
if (refreshRequest) {
|
||||||
refreshRequest = false;
|
refreshRequest = false;
|
||||||
@ -695,49 +691,79 @@ public class Keyboard {
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
||||||
-coord-
|
|
||||||
NORMAL
|
|
||||||
SHIFT
|
|
||||||
ALPHA
|
|
||||||
-------
|
|
||||||
|
|
||||||
|0,0---|0,1---|------|0,3---|------|------|0,6---|
|
Keyboard:
|
||||||
|SHIFT |ALPHA |------| ^ |------|------|+BRIGH|
|
Example button:
|
||||||
|SHIFT |ALPHA |------| |------|------|-BRIGH|
|
|ROW,COLUMN----|
|
||||||
|SHIFT |ALPHA |------| |------|------| |
|
| NORMAL STATE |
|
||||||
|1,0---|1,1---|1,2---|1,3---|1,4---|1,5---|1,6---|
|
| SHIFT STATE |
|
||||||
| = | | < | OK | > | Back | Fwd |
|
| ALPHA STATE |
|
||||||
| | | | | | | |
|
|--------------|
|
||||||
| | | | | | | |
|
|
||||||
|2,0---|2,1---|------|2,3---|------|2,5---|2,6---|
|
Physical keyboard:
|
||||||
| | SQRT |------| v |------| | |
|
|0,0-----|0,1-----|########|0,3-----|########|0,5-----|0,6-----|
|
||||||
| | ROOT |------| |------| | |
|
| SHIFT | ALPHA |########| ^ |########|SETTINGS|+BRIGHT |
|
||||||
| | |------| |------| | |
|
| NORMAL | ALPHA |########| |########| |-BRIGHT |
|
||||||
|3,0---|3,1---|3,2---|3,3---|3,4---|3,5---|3,6---|
|
| SHIFT | NORMAL |########| |########| | |
|
||||||
| | | POW 2| POW x| | | |
|
|1,0-----|1,1-----|1,2-----|1,3-----|1,4-----|1,5-----|1,6-----|
|
||||||
| | | | | | | |
|
| F_4 | | < | OK | > | Back | Fwd |
|
||||||
| | | | | | | |
|
| F_4 | | | | | | |
|
||||||
|4,0---|4,1---|4,2---|4,3---|4,4---|4,5---|4,6---|
|
| F_4 | | | | | | |
|
||||||
| | | | | |S<=>D | |
|
|2,0-----|2,1-----|--------|2,3-----|--------|2,5-----|2,6-----|
|
||||||
| | | | | | | |
|
| F_3 | SQRT |########| v | BACK | | |
|
||||||
| | | | | | | |
|
| F_3 | ROOT |########| | | | |
|
||||||
|5,0---|5,1---|5,2---|5,3---|5,4---|5,5---|5,6---|
|
| F_3 | |########| | | | |
|
||||||
|
|3,0-----|3,1-----|3,2-----|3,3-----|3,4-----|3,5-----|3,6-----|
|
||||||
|
| F_2 | | POW x | POW 2 | | | |
|
||||||
|
| F_2 | | | | | | |
|
||||||
|
| F_2 | | | | | | |
|
||||||
|
|4,0-----|4,1-----|4,2-----|4,3-----|4,4-----|4,5-----|4,6-----|
|
||||||
|
| F_1 | | ( | ) | | S<=>D | |
|
||||||
|
| F_1 | | | | | | |
|
||||||
|
| F_1 | | | | | | |
|
||||||
|
|5,0-----|5,1-----|5,2-----|5,3-----|5,4-----|5,5-----|5,6-----|
|
||||||
| 7 | 8 | 9 | DEL | RESET |
|
| 7 | 8 | 9 | DEL | RESET |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
|6,0---|6,1---|6,2---|6,3---|6,4-----------------|
|
|6,0-----|6,1-----|6,2-----|6,3-----|6,4-----------------------|
|
||||||
| 4 | 5 | 6 | * | / |
|
| 4 | 5 | 6 | * | / |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
|7,0---|7,1---|7,2---|7,3---|7,4-----------------|
|
|7,0-----|7,1-----|7,2-----|7,3-----|7,4-----------------------|
|
||||||
| 1 | 2 | 3 | + | - |
|
| 1 | 2 | 3 | + | - |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
|4,7---|3,7---|2,7---|1,7---|0,7-----------------|
|
|4,7-----|3,7-----|2,7-----|1,7-----|0,7-----------------------|
|
||||||
| 0 | . | | | SIMPLIFY |
|
| 0 | . | | | SIMPLIFY |
|
||||||
| | | |PI | STEP |
|
| | | |PI | STEP |
|
||||||
| X | Y | Z |DRGCYCL|SOLVE FOR [x] |
|
| X | Y | Z |DRG CYCL| |
|
||||||
|------|------|------|------|--------------------|
|
|--------|--------|--------|--------|--------------------------|
|
||||||
|
|
||||||
|
|
||||||
|
SCREEN F_n:
|
||||||
|
MathInputScreen:
|
||||||
|
Default:
|
||||||
|
[F_1] Normal: Solve for X Shift: Solve for _ Alpha:
|
||||||
|
[F_2] Normal: Shift: Alpha:
|
||||||
|
[F_3] Normal: Variables & constants Shift: Alpha:
|
||||||
|
[F_4] Normal: Functions f(x) Shift: Alpha:
|
||||||
|
Variable popup:
|
||||||
|
[F_1] Normal(if constant):Set value Shift: Alpha:
|
||||||
|
[F_2] Normal: Shift: Alpha:
|
||||||
|
[F_3] Normal: Shift: Alpha:
|
||||||
|
[F_4] Normal: Shift: Alpha:
|
||||||
|
MarioScreen
|
||||||
|
[F_1] Normal: Shift: Alpha:
|
||||||
|
[F_2] Normal: Shift: Alpha:
|
||||||
|
[F_3] Normal: Shift: Alpha:
|
||||||
|
[F_4] Normal: Shift: Alpha:
|
||||||
|
ChooseVariableValueScreen
|
||||||
|
[F_1] Normal: Shift: Alpha:
|
||||||
|
[F_2] Normal: Shift: Alpha:
|
||||||
|
[F_3] Normal: Shift: Alpha:
|
||||||
|
[F_4] Normal: Shift: Alpha:
|
||||||
|
SolveForXScreen
|
||||||
|
[F_1] Normal: Shift: Alpha:
|
||||||
|
[F_2] Normal: Shift: Alpha:
|
||||||
|
[F_3] Normal: Shift: Alpha:
|
||||||
|
[F_4] Normal: Shift: Alpha:
|
||||||
*/
|
*/
|
@ -1,7 +1,5 @@
|
|||||||
package org.warp.picalculator.device;
|
package org.warp.picalculator.device;
|
||||||
|
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
|
|
||||||
public interface KeyboardEventListener {
|
public interface KeyboardEventListener {
|
||||||
public abstract boolean keyPressed(Key k);
|
public abstract boolean keyPressed(Key k);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.warp.picalculator.gui.expression.blocks;
|
package org.warp.picalculator.gui.expression.blocks;
|
||||||
|
|
||||||
import org.warp.picalculator.Error;
|
import org.warp.picalculator.Error;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.gui.expression.Caret;
|
import org.warp.picalculator.gui.expression.Caret;
|
||||||
import org.warp.picalculator.gui.expression.ExtraMenu;
|
import org.warp.picalculator.gui.expression.ExtraMenu;
|
||||||
|
@ -25,7 +25,7 @@ public class CPUFont implements BinaryFont {
|
|||||||
public int charH;
|
public int charH;
|
||||||
public int charS;
|
public int charS;
|
||||||
public int charIntCount;
|
public int charIntCount;
|
||||||
public LinkedList<Integer[]> intervals;
|
public int[] intervals;
|
||||||
public int intervalsTotalSize = 0;
|
public int intervalsTotalSize = 0;
|
||||||
public static final int intBits = 31;
|
public static final int intBits = 31;
|
||||||
private final boolean isResource;
|
private final boolean isResource;
|
||||||
@ -167,7 +167,7 @@ public class CPUFont implements BinaryFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void findIntervals() {
|
private void findIntervals() {
|
||||||
intervals = new LinkedList<Integer[]>();
|
final LinkedList<int[]> intervals = new LinkedList<int[]>();
|
||||||
int beginIndex = -1;
|
int beginIndex = -1;
|
||||||
int endIndex = 0;
|
int endIndex = 0;
|
||||||
int intervalSize = 0;
|
int intervalSize = 0;
|
||||||
@ -183,7 +183,7 @@ public class CPUFont implements BinaryFont {
|
|||||||
i = endIndex;
|
i = endIndex;
|
||||||
if (endIndex >= 0) {
|
if (endIndex >= 0) {
|
||||||
intervalSize = endIndex - beginIndex + 1;
|
intervalSize = endIndex - beginIndex + 1;
|
||||||
intervals.add(new Integer[] {beginIndex, endIndex, intervalSize});
|
intervals.add(new int[] {beginIndex, endIndex, intervalSize});
|
||||||
intervalsTotalSize += intervalSize;
|
intervalsTotalSize += intervalSize;
|
||||||
}
|
}
|
||||||
beginIndex = -1;
|
beginIndex = -1;
|
||||||
@ -191,7 +191,7 @@ public class CPUFont implements BinaryFont {
|
|||||||
}
|
}
|
||||||
int lastIndex = 0;
|
int lastIndex = 0;
|
||||||
boolean[][] newrawchars = new boolean[intervalsTotalSize][];
|
boolean[][] newrawchars = new boolean[intervalsTotalSize][];
|
||||||
for (Integer[] interval: intervals) {
|
for (int[] interval: intervals) {
|
||||||
if (rawchars.length - (interval[0]) - interval[2] < 0) {
|
if (rawchars.length - (interval[0]) - interval[2] < 0) {
|
||||||
System.err.println(interval[0] + "-" + interval[1] + "(" + interval[2] + ")");
|
System.err.println(interval[0] + "-" + interval[1] + "(" + interval[2] + ")");
|
||||||
System.err.println(rawchars.length - (interval[0]) - interval[2]);
|
System.err.println(rawchars.length - (interval[0]) - interval[2]);
|
||||||
@ -205,6 +205,14 @@ public class CPUFont implements BinaryFont {
|
|||||||
lastIndex += interval[2];
|
lastIndex += interval[2];
|
||||||
}
|
}
|
||||||
rawchars = newrawchars;
|
rawchars = newrawchars;
|
||||||
|
final int intervalsSize = intervals.size();
|
||||||
|
this.intervals = new int[intervalsSize * 3];
|
||||||
|
for (int i = 0; i < intervalsSize; i++) {
|
||||||
|
int[] interval = intervals.get(i);
|
||||||
|
this.intervals[i * 3 + 0] = interval[0];
|
||||||
|
this.intervals[i * 3 + 1] = interval[1];
|
||||||
|
this.intervals[i * 3 + 2] = interval[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@ -237,14 +245,14 @@ public class CPUFont implements BinaryFont {
|
|||||||
|
|
||||||
private int compressIndex(int originalIndex) {
|
private int compressIndex(int originalIndex) {
|
||||||
int compressedIndex = 0;
|
int compressedIndex = 0;
|
||||||
for (Integer[] interval : intervals) {
|
for (int i = 0; i < intervals.length; i+=3) {
|
||||||
if (interval[0] > originalIndex) {
|
if (intervals[i] > originalIndex) {
|
||||||
break;
|
break;
|
||||||
} else if (originalIndex <= interval[1]) {
|
} else if (originalIndex <= intervals[i+1]) {
|
||||||
compressedIndex+=(originalIndex-interval[0]);
|
compressedIndex+=(originalIndex-intervals[i]);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
compressedIndex+=interval[2];
|
compressedIndex+=intervals[i+2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return compressedIndex;
|
return compressedIndex;
|
||||||
@ -253,12 +261,12 @@ public class CPUFont implements BinaryFont {
|
|||||||
private int decompressIndex(int compressedIndex) {
|
private int decompressIndex(int compressedIndex) {
|
||||||
int originalIndex = 0;
|
int originalIndex = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Integer[] interval : intervals) {
|
for (int intvl = 0; intvl < intervals.length; intvl+=3) {
|
||||||
i+=interval[2];
|
i+=intervals[intvl+2];
|
||||||
if (i == compressedIndex) {
|
if (i == compressedIndex) {
|
||||||
return interval[1];
|
return intervals[intvl+1];
|
||||||
} else if (i > compressedIndex) {
|
} else if (i > compressedIndex) {
|
||||||
return interval[1] - (i - compressedIndex);
|
return intervals[intvl+1] - (i - compressedIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return originalIndex;
|
return originalIndex;
|
||||||
|
@ -28,7 +28,7 @@ public class GPUFont implements BinaryFont {
|
|||||||
public int charH;
|
public int charH;
|
||||||
public int minCharIndex;
|
public int minCharIndex;
|
||||||
public int maxCharIndex;
|
public int maxCharIndex;
|
||||||
public LinkedList<Integer[]> intervals;
|
public int[] intervals;
|
||||||
public int intervalsTotalSize = 0;
|
public int intervalsTotalSize = 0;
|
||||||
public int memoryWidth;
|
public int memoryWidth;
|
||||||
public int memoryHeight;
|
public int memoryHeight;
|
||||||
@ -89,14 +89,14 @@ public class GPUFont implements BinaryFont {
|
|||||||
|
|
||||||
private int compressIndex(int originalIndex) {
|
private int compressIndex(int originalIndex) {
|
||||||
int compressedIndex = 0;
|
int compressedIndex = 0;
|
||||||
for (Integer[] interval : intervals) {
|
for (int i = 0; i < intervals.length; i+=3) {
|
||||||
if (interval[0] > originalIndex) {
|
if (intervals[i] > originalIndex) {
|
||||||
break;
|
break;
|
||||||
} else if (originalIndex <= interval[1]) {
|
} else if (originalIndex <= intervals[i+1]) {
|
||||||
compressedIndex+=(originalIndex-interval[0]);
|
compressedIndex+=(originalIndex-intervals[i]);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
compressedIndex+=interval[2];
|
compressedIndex+=intervals[i+2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return compressedIndex;
|
return compressedIndex;
|
||||||
@ -105,10 +105,10 @@ public class GPUFont implements BinaryFont {
|
|||||||
private int decompressIndex(int compressedIndex) {
|
private int decompressIndex(int compressedIndex) {
|
||||||
int originalIndex = 0;
|
int originalIndex = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Integer[] interval : intervals) {
|
for (int intvl = 0; i < intervals.length; i+=3) {
|
||||||
i+=interval[2];
|
i+=intervals[intvl+2];
|
||||||
if (i >= compressedIndex) {
|
if (i >= compressedIndex) {
|
||||||
return interval[1] - (i - compressedIndex);
|
return intervals[intvl+1] - (i - compressedIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return originalIndex;
|
return originalIndex;
|
||||||
|
@ -27,12 +27,15 @@ public class GPURenderer implements Renderer {
|
|||||||
|
|
||||||
public static GL2ES1 gl;
|
public static GL2ES1 gl;
|
||||||
|
|
||||||
|
private static final int ELEMENTS_MAX_COUNT_PER_BUFFER = StaticVars.enableVBO ? 128 : 1;
|
||||||
private static final int ELEMENT_VERTICES_COUNT = 6,
|
private static final int ELEMENT_VERTICES_COUNT = 6,
|
||||||
vertSize = 3, texSize = 2, colSize = 4,
|
vertSize = 3, texSize = 2, colSize = 4,
|
||||||
vertBuffer = 0, texBuffer = 1, colBuffer = 2;
|
vertBuffer = 0, texBuffer = 1, colBuffer = 2,
|
||||||
private static final int ELEMENTS_MAX_COUNT_PER_BUFFER = StaticVars.enableVBO ? 128 : 1;
|
vertMax = vertSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER,
|
||||||
|
texMax = texSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER,
|
||||||
|
colMax = colSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER;
|
||||||
|
|
||||||
private IntBuffer handlers;
|
private int[] handlers;
|
||||||
private final DeallocationHelper deallocationHelper = new DeallocationHelper();
|
private final DeallocationHelper deallocationHelper = new DeallocationHelper();
|
||||||
FloatBuffer fbVertices;
|
FloatBuffer fbVertices;
|
||||||
FloatBuffer fbTextures;
|
FloatBuffer fbTextures;
|
||||||
@ -299,11 +302,11 @@ public class GPURenderer implements Renderer {
|
|||||||
public void initDrawCycle() {
|
public void initDrawCycle() {
|
||||||
final boolean textureChange = precTexEnabled != currentTexEnabled || precTex != currentTex;
|
final boolean textureChange = precTexEnabled != currentTexEnabled || precTex != currentTex;
|
||||||
if (fbVertices == null) {
|
if (fbVertices == null) {
|
||||||
fbVertices = Buffers.newDirectFloatBuffer(vertSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER);
|
fbVertices = Buffers.newDirectFloatBuffer(vertMax);
|
||||||
fbTextures = Buffers.newDirectFloatBuffer(texSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER);
|
fbTextures = Buffers.newDirectFloatBuffer(texMax);
|
||||||
fbColors = Buffers.newDirectFloatBuffer(colSize * ELEMENT_VERTICES_COUNT * ELEMENTS_MAX_COUNT_PER_BUFFER);
|
fbColors = Buffers.newDirectFloatBuffer(colMax);
|
||||||
handlers = Buffers.newDirectIntBuffer(3);
|
handlers = new int[3];
|
||||||
gl.glGenBuffers(3, handlers);
|
gl.glGenBuffers(3, handlers, 0);
|
||||||
}
|
}
|
||||||
startDrawSegment(false);
|
startDrawSegment(false);
|
||||||
if (textureChange) {
|
if (textureChange) {
|
||||||
@ -374,7 +377,7 @@ public class GPURenderer implements Renderer {
|
|||||||
fbColors.flip();
|
fbColors.flip();
|
||||||
|
|
||||||
// gl.glVertexPointer(vertSize, GL.GL_FLOAT, 0, fbVertices);
|
// gl.glVertexPointer(vertSize, GL.GL_FLOAT, 0, fbVertices);
|
||||||
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers.get(vertBuffer));
|
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers[vertBuffer]);
|
||||||
if (firstBufferTexDataCall) {
|
if (firstBufferTexDataCall) {
|
||||||
gl.glBufferData(
|
gl.glBufferData(
|
||||||
GL.GL_ARRAY_BUFFER, fbVertices.limit() * Buffers.SIZEOF_FLOAT,
|
GL.GL_ARRAY_BUFFER, fbVertices.limit() * Buffers.SIZEOF_FLOAT,
|
||||||
@ -387,7 +390,7 @@ public class GPURenderer implements Renderer {
|
|||||||
}
|
}
|
||||||
gl.glVertexPointer(vertSize, GL.GL_FLOAT, 0, 0l);
|
gl.glVertexPointer(vertSize, GL.GL_FLOAT, 0, 0l);
|
||||||
// gl.glTexCoordPointer(texSize, GL.GL_FLOAT, 0, fbTextures);
|
// gl.glTexCoordPointer(texSize, GL.GL_FLOAT, 0, fbTextures);
|
||||||
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers.get(texBuffer));
|
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers[texBuffer]);
|
||||||
if (firstBufferTexDataCall) {
|
if (firstBufferTexDataCall) {
|
||||||
gl.glBufferData(
|
gl.glBufferData(
|
||||||
GL.GL_ARRAY_BUFFER, fbTextures.limit() * Buffers.SIZEOF_FLOAT,
|
GL.GL_ARRAY_BUFFER, fbTextures.limit() * Buffers.SIZEOF_FLOAT,
|
||||||
@ -400,7 +403,7 @@ public class GPURenderer implements Renderer {
|
|||||||
}
|
}
|
||||||
gl.glTexCoordPointer(texSize, GL.GL_FLOAT, 0, 0l);
|
gl.glTexCoordPointer(texSize, GL.GL_FLOAT, 0, 0l);
|
||||||
// gl.glColorPointer(colSize, GL.GL_FLOAT, 0, fbColors);
|
// gl.glColorPointer(colSize, GL.GL_FLOAT, 0, fbColors);
|
||||||
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers.get(colBuffer));
|
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, handlers[colBuffer]);
|
||||||
if (firstBufferTexDataCall) {
|
if (firstBufferTexDataCall) {
|
||||||
gl.glBufferData(
|
gl.glBufferData(
|
||||||
GL.GL_ARRAY_BUFFER, fbColors.limit() * Buffers.SIZEOF_FLOAT,
|
GL.GL_ARRAY_BUFFER, fbColors.limit() * Buffers.SIZEOF_FLOAT,
|
||||||
@ -412,11 +415,10 @@ public class GPURenderer implements Renderer {
|
|||||||
fbColors);
|
fbColors);
|
||||||
}
|
}
|
||||||
gl.glColorPointer(colSize, GL.GL_FLOAT, 0, 0l);
|
gl.glColorPointer(colSize, GL.GL_FLOAT, 0, 0l);
|
||||||
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
|
|
||||||
|
|
||||||
fbVertices.limit(fbVertices.capacity());
|
fbVertices.limit(vertMax);
|
||||||
fbTextures.limit(fbTextures.capacity());
|
fbTextures.limit(texMax);
|
||||||
fbColors.limit(fbColors.capacity());
|
fbColors.limit(colMax);
|
||||||
gl.glDrawArrays(GL.GL_TRIANGLES, 0, fbElements * ELEMENT_VERTICES_COUNT);
|
gl.glDrawArrays(GL.GL_TRIANGLES, 0, fbElements * ELEMENT_VERTICES_COUNT);
|
||||||
//gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, fbElements * ELEMENT_VERTICES_COUNT);
|
//gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, fbElements * ELEMENT_VERTICES_COUNT);
|
||||||
firstBufferDataCall = false;
|
firstBufferDataCall = false;
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
package org.warp.picalculator.gui.graphicengine.gpu;
|
package org.warp.picalculator.gui.graphicengine.gpu;
|
||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
|
|
||||||
import com.jogamp.newt.event.KeyEvent;
|
import com.jogamp.newt.event.KeyEvent;
|
||||||
@ -142,7 +142,7 @@ class NEWTWindow implements GLEventListener {
|
|||||||
public void keyReleased(KeyEvent arg0) {
|
public void keyReleased(KeyEvent arg0) {
|
||||||
switch (arg0.getKeyCode()) {
|
switch (arg0.getKeyCode()) {
|
||||||
case KeyEvent.VK_ESCAPE:
|
case KeyEvent.VK_ESCAPE:
|
||||||
Keyboard.keyReleased(Key.POWER);
|
Keyboard.keyReleased(Key.POWEROFF);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_D:
|
case KeyEvent.VK_D:
|
||||||
Keyboard.keyReleased(Key.debug_DEG);
|
Keyboard.keyReleased(Key.debug_DEG);
|
||||||
|
@ -7,8 +7,8 @@ import org.fusesource.jansi.AnsiConsole;
|
|||||||
import org.fusesource.jansi.internal.WindowsSupport;
|
import org.fusesource.jansi.internal.WindowsSupport;
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.Utils;
|
import org.warp.picalculator.Utils;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.graphicengine.Renderer;
|
import org.warp.picalculator.gui.graphicengine.Renderer;
|
||||||
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ import org.fusesource.jansi.AnsiConsole;
|
|||||||
import org.fusesource.jansi.internal.WindowsSupport;
|
import org.fusesource.jansi.internal.WindowsSupport;
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.Utils;
|
import org.warp.picalculator.Utils;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.graphicengine.Renderer;
|
import org.warp.picalculator.gui.graphicengine.Renderer;
|
||||||
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
||||||
import org.warp.picalculator.gui.graphicengine.headless24bit.Headless24bitRenderer;
|
import org.warp.picalculator.gui.graphicengine.headless24bit.Headless24bitRenderer;
|
||||||
|
@ -7,8 +7,8 @@ import org.fusesource.jansi.AnsiConsole;
|
|||||||
import org.fusesource.jansi.internal.WindowsSupport;
|
import org.fusesource.jansi.internal.WindowsSupport;
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.Utils;
|
import org.warp.picalculator.Utils;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.graphicengine.Renderer;
|
import org.warp.picalculator.gui.graphicengine.Renderer;
|
||||||
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
import org.warp.picalculator.gui.graphicengine.RenderingLoop;
|
||||||
import org.warp.picalculator.gui.graphicengine.headless24bit.Headless24bitRenderer;
|
import org.warp.picalculator.gui.graphicengine.headless24bit.Headless24bitRenderer;
|
||||||
|
@ -2,7 +2,7 @@ package org.warp.picalculator.gui.screens;
|
|||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.Utils;
|
import org.warp.picalculator.Utils;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.math.Function;
|
import org.warp.picalculator.math.Function;
|
||||||
import org.warp.picalculator.math.functions.Variable.VariableValue;
|
import org.warp.picalculator.math.functions.Variable.VariableValue;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.warp.picalculator.gui.screens;
|
package org.warp.picalculator.gui.screens;
|
||||||
|
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
|
|
||||||
public class EmptyScreen extends Screen {
|
public class EmptyScreen extends Screen {
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.warp.picalculator.gui.screens;
|
package org.warp.picalculator.gui.screens;
|
||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.gui.graphicengine.Renderer;
|
import org.warp.picalculator.gui.graphicengine.Renderer;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.warp.picalculator.gui.screens;
|
package org.warp.picalculator.gui.screens;
|
||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.gui.GraphicUtils;
|
import org.warp.picalculator.gui.GraphicUtils;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ package org.warp.picalculator.gui.screens;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.gui.graphicengine.BinaryFont;
|
import org.warp.picalculator.gui.graphicengine.BinaryFont;
|
||||||
import org.warp.picalculator.gui.graphicengine.Skin;
|
import org.warp.picalculator.gui.graphicengine.Skin;
|
||||||
|
@ -7,8 +7,8 @@ import org.warp.picalculator.Error;
|
|||||||
import org.warp.picalculator.Errors;
|
import org.warp.picalculator.Errors;
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.Utils;
|
import org.warp.picalculator.Utils;
|
||||||
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.device.Keyboard;
|
import org.warp.picalculator.device.Keyboard;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
import org.warp.picalculator.gui.expression.InputContext;
|
import org.warp.picalculator.gui.expression.InputContext;
|
||||||
import org.warp.picalculator.gui.expression.blocks.Block;
|
import org.warp.picalculator.gui.expression.blocks.Block;
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package org.warp.picalculator.gui.screens;
|
package org.warp.picalculator.gui.screens;
|
||||||
|
|
||||||
import org.warp.picalculator.StaticVars;
|
import org.warp.picalculator.StaticVars;
|
||||||
import org.warp.picalculator.device.Keyboard.Key;
|
import org.warp.picalculator.device.Key;
|
||||||
import org.warp.picalculator.gui.DisplayManager;
|
import org.warp.picalculator.gui.DisplayManager;
|
||||||
|
|
||||||
public class SolveEquationScreen extends Screen {
|
public class SolveForXScreen extends Screen {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private final MathInputScreen es;
|
private final MathInputScreen es;
|
||||||
|
|
||||||
public SolveEquationScreen(MathInputScreen es) {
|
public SolveForXScreen(MathInputScreen es) {
|
||||||
super();
|
super();
|
||||||
canBeInHistory = false;
|
canBeInHistory = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user