OVFY and PLUSMINUS
This commit is contained in:
parent
35fa1ff224
commit
7201e89498
1 changed files with 5 additions and 6 deletions
|
@ -1534,17 +1534,16 @@ var button = func(btn, i, event = "") {
|
|||
} else if (btn == "DOT") {
|
||||
mcdu_scratchpad.scratchpads[i].addChar(".");
|
||||
} else if (btn == "PLUSMINUS") {
|
||||
if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") {
|
||||
var _toggle = right(scratchpad,1);
|
||||
if (_toggle == "+" or _toggle == "-") {
|
||||
_toggle = (_toggle == "-") ? "+" : "-";
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
mcdu_scratchpad.scratchpads[i].addChar("+");
|
||||
} else if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "+") {
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
mcdu_scratchpad.scratchpads[i].addChar("-");
|
||||
mcdu_scratchpad.scratchpads[i].addChar(_toggle);
|
||||
} else {
|
||||
mcdu_scratchpad.scratchpads[i].addChar("-");
|
||||
}
|
||||
} else if (btn == "OVFY") {
|
||||
if (mcdu_scratchpad.scratchpads[i].scratchpad == "") {
|
||||
if (size(scratchpad) == 0) {
|
||||
mcdu_scratchpad.scratchpads[i].addChar("@");
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
|
Loading…
Reference in a new issue