-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstructionsWindow.t
38 lines (27 loc) · 978 Bytes
/
InstructionsWindow.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% This is the font window file
% opens a new window and displays the graphics messages to this window
proc displayInstructionsWindow
fork click
% Open the window
var wininstructID : int
wininstructID := Window.Open ("position:top;center,graphics:1200;900,title:Read the Instructions")
isInstructionsWindowOpen := true
var quitButton := GUI.CreateButton (maxx - 100, 25, 0, "Close", QuitInstructionsWindowButtonPressed)
var stream : int
var sword : string
open : stream, "Files/Text/Instructions.txt", get
loop
exit when eof (stream)
get : stream, sword : *
put sword
end loop
close : stream
% Window will continue until quit button is pressed
loop
exit when GUI.ProcessEvent or isInstructionsWindowOpen = false
end loop
%close/release the window
Window.Hide (wininstructID)
% release the button
GUI.Dispose (quitButton)
end displayInstructionsWindow