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);
|
||||
append(me.writebuffer, lines);
|
||||
},
|
||||
clear : func() {
|
||||
me.lines = [];
|
||||
me.writebuffer = [];
|
||||
me.show();
|
||||
},
|
||||
show : func {
|
||||
if (me.dialog != nil)
|
||||
me.close();
|
||||
|
|
|
@ -105,6 +105,7 @@ var startTutorial = func {
|
|||
# <init>
|
||||
do_group(tutorialN.getNode("init"));
|
||||
is_running(1); # needs to be after "presets-commit"
|
||||
display.clear();
|
||||
display.show();
|
||||
|
||||
# Pick up any weather conditions/scenarios set
|
||||
|
@ -121,6 +122,7 @@ var stopTutorial = func {
|
|||
set_properties(end);
|
||||
run_nasal(end);
|
||||
set_view(end) or view.point.restore();
|
||||
say("Tutorial finished.");
|
||||
settimer(func() { if (!is_running()) { display.close(); } }, 10);
|
||||
}
|
||||
set_marker();
|
||||
|
@ -150,8 +152,6 @@ var step_tutorial = func(id) {
|
|||
# <end>
|
||||
if (current_step >= size(steps)) {
|
||||
var end = tutorialN.getNode("end");
|
||||
say_message(end, "Tutorial finished.");
|
||||
#say_message(nil, "Deviations: " ~ num_errors);
|
||||
stopTutorial();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue