blob: 01165512849e561717d7b8810324f1c9edfd990b (
plain) (
blame)
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
|
/*
* Graphyx
* copyright (c) 2009 Jakob Odersky
* made available under the MIT License
*/
package graphyx.actors
import graphyx.graphics._
import scala.actors._
class GUIActor extends Actor{
val container = new graphyx.gui.Container
var continue = true
def act() = {
container.show()
println("GUI actor started.")
while (continue) {
receive {
case Exit => {
continue = false
}
case s @ Scene(_) => container.update(s)
case other => println("Engine received unknown command: " + other)
}
}
println("GUI actor exited.")
}
}
|