home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2006 April
/
Gamestar_83_2006-04_dvd.iso
/
Dema
/
keepsake_demo_en.exe
/
res
/
interface
/
common
/
itf.vision.tcl
< prev
next >
Wrap
Text File
|
2005-10-19
|
4KB
|
137 lines
source "../res/scripts/vision.tcl"
class itf'vision {
proc itf'vision {this} oz'widget {itf'quit} {
set base "interface/[MODE]/vision"
set ($this,bg) [new oz'sprite "$base/vision.bg"]
set ($this,vision1) [new oz'button "$base/vision.01"]
set ($this,vision2) [new oz'button "$base/vision.02"]
set ($this,vision3) [new oz'button "$base/vision.03"]
set ($this,vision4) [new oz'button "$base/vision.04"]
set ($this,vision5) [new oz'button "$base/vision.05"]
set ($this,vision6) [new oz'button "$base/vision.06"]
oz'widget::bind $this enter itf'quit::enter $this
oz'widget::bind $this leave itf'quit::leave $this
oz'widget::property $this -isize [oz'widget::width $($this,bg)] [oz'widget::height $($this,bg)]
oz'button::property $($this,vision1) -pos 0.093750 0.000000 -alpha 1 -click itf'vision::play 1
oz'button::property $($this,vision2) -pos 0.312500 0.000000 -alpha 1 -click itf'vision::play 2
oz'button::property $($this,vision3) -pos 0.093750 0.222656 -alpha 1 -click itf'vision::play 3
oz'button::property $($this,vision4) -pos 0.312500 0.222656 -alpha 1 -click itf'vision::play 4
oz'button::property $($this,vision5) -pos 0.093750 0.444010 -alpha 1 -click itf'vision::play 5
oz'button::property $($this,vision6) -pos 0.312500 0.444010 -alpha 1 -click itf'vision::play 6
oz'widget::child $this $($this,bg) 1
oz'widget::child $this $($this,vision1) 0
oz'widget::child $this $($this,vision2) 0
oz'widget::child $this $($this,vision3) 0
oz'widget::child $this $($this,vision4) 0
oz'widget::child $this $($this,vision5) 0
oz'widget::child $this $($this,vision6) 0
}
proc ~itf'vision {this} {
delete $($this,bg)
delete $($this,vision1)
delete $($this,vision2)
delete $($this,vision3)
delete $($this,vision4)
delete $($this,vision5)
delete $($this,vision6)
}
proc play {n} {
CloseAllInterface
CloseAllSounds
oz'event {
freezePlayer
wizDisableMouse
oz'delay 0.5
}
oz'event {
standardFadeout
}
oz'event {
hideInterface
hideMouse
wizEntityHide Lydia
wizEntityHide Zak
}
::qPlayVision$n
oz'event {
setScene [ozGet "sysScene"] [ozGet "sysWorld"]
oz'delay 0.001
}
oz'event {
showInterface
showMouse
wizEntityShow Lydia
wizEntityShow Zak
standardFadein
}
oz'event {
unfreezePlayer
wizEnableMouse
}
}
proc show {this} {
oz'widget::fadeto $this 1
if {[ozGet "visionOne"] == "viewed"} {
oz'button::enable $($this,vision1)
} else {
oz'button::disable $($this,vision1)
}
if {[ozGet "visionTwo"] == "viewed"} {
oz'button::enable $($this,vision2)
} else {
oz'button::disable $($this,vision2)
}
if {[ozGet "visionThree"] == "viewed"} {
oz'button::enable $($this,vision3)
} else {
oz'button::disable $($this,vision3)
}
if {[ozGet "visionFour"] == "viewed"} {
oz'button::enable $($this,vision4)
} else {
oz'button::disable $($this,vision4)
}
if {[ozGet "visionFive"] == "viewed"} {
oz'button::enable $($this,vision5)
} else {
oz'button::disable $($this,vision5)
}
if {[ozGet "visionSix"] == "viewed"} {
oz'button::enable $($this,vision6)
} else {
oz'button::disable $($this,vision6)
}
}
proc hide {this} {
oz'widget::fadeto $this 0
}
proc enter {this} {
oz'mouse::cursor +100
}
proc leave {this} {
oz'mouse::cursor -100
}
}