Add ability to clear screen.window, and use it.
This commit is contained in:
parent
8862167700
commit
c014e35aec
2 changed files with 7 additions and 2 deletions
|
@ -116,6 +116,11 @@ var window = {
|
||||||
settimer(func { me._write_(); } , 0, 1);
|
settimer(func { me._write_(); } , 0, 1);
|
||||||
append(me.writebuffer, lines);
|
append(me.writebuffer, lines);
|
||||||
},
|
},
|
||||||
|
clear : func() {
|
||||||
|
me.lines = [];
|
||||||
|
me.writebuffer = [];
|
||||||
|
me.show();
|
||||||
|
},
|
||||||
show : func {
|
show : func {
|
||||||
if (me.dialog != nil)
|
if (me.dialog != nil)
|
||||||
me.close();
|
me.close();
|
||||||
|
|
|
@ -105,6 +105,7 @@ var startTutorial = func {
|
||||||
# <init>
|
# <init>
|
||||||
do_group(tutorialN.getNode("init"));
|
do_group(tutorialN.getNode("init"));
|
||||||
is_running(1); # needs to be after "presets-commit"
|
is_running(1); # needs to be after "presets-commit"
|
||||||
|
display.clear();
|
||||||
display.show();
|
display.show();
|
||||||
|
|
||||||
# Pick up any weather conditions/scenarios set
|
# Pick up any weather conditions/scenarios set
|
||||||
|
@ -121,6 +122,7 @@ var stopTutorial = func {
|
||||||
set_properties(end);
|
set_properties(end);
|
||||||
run_nasal(end);
|
run_nasal(end);
|
||||||
set_view(end) or view.point.restore();
|
set_view(end) or view.point.restore();
|
||||||
|
say("Tutorial finished.");
|
||||||
settimer(func() { if (!is_running()) { display.close(); } }, 10);
|
settimer(func() { if (!is_running()) { display.close(); } }, 10);
|
||||||
}
|
}
|
||||||
set_marker();
|
set_marker();
|
||||||
|
@ -150,8 +152,6 @@ var step_tutorial = func(id) {
|
||||||
# <end>
|
# <end>
|
||||||
if (current_step >= size(steps)) {
|
if (current_step >= size(steps)) {
|
||||||
var end = tutorialN.getNode("end");
|
var end = tutorialN.getNode("end");
|
||||||
say_message(end, "Tutorial finished.");
|
|
||||||
#say_message(nil, "Deviations: " ~ num_errors);
|
|
||||||
stopTutorial();
|
stopTutorial();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue