home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CyberMycha 2006 April
/
SGP.iso
/
dema
/
Keepsake-Demo-en-li-v1.0.exe
/
res
/
interface
/
common
/
itf.quit.tcl
< prev
next >
Wrap
Text File
|
2005-11-01
|
4KB
|
136 lines
class itf'quit {
proc itf'quit {this} oz'widget {itf'quit} {
set base "interface/[MODE]/quit"
set ($this,bg) [new oz'sprite "$base/quit.bg"]
set ($this,save.label) [new oz'label "save" 0.480460 0.057291]
set ($this,save.butt) [new oz'button "$base/quit.save"]
set ($this,quit.label) [new oz'label "quit" 0.480460 0.057291]
set ($this,quit.butt) [new oz'button "$base/quit.quit"]
set ($this,quitsave.label) [new oz'label "quitsave" 0.480460 0.057291]
set ($this,quitsave.butt) [new oz'button "$base/quit.quitsave"]
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'label::property $($this,save.label) -pos 0.095703 0.029948 -alpha 1 -font caligula.ttf -fsize 24 \
-color 1 1 1 -text $::lng::q_save
oz'button::property $($this,save.butt) -pos 0.061523 0.029948 -alpha 1 -click itf'quit::save $this
oz'label::property $($this,quit.label) -pos 0.095703 0.093750 -alpha 1 -font caligula.ttf -fsize 24 \
-color 1 1 1 -text $::lng::q_quit
oz'button::property $($this,quit.butt) -pos 0.061523 0.093750 -alpha 1 -click itf'quit::quit $this
oz'label::property $($this,quitsave.label) -pos 0.095703 0.157552 -alpha 1 -font caligula.ttf -fsize 24 \
-color 1 1 1 -text $::lng::q_savequit
oz'button::property $($this,quitsave.butt) -pos 0.061523 0.157552 -alpha 1 -click itf'quit::quitsave $this
oz'widget::child $this $($this,bg) 1
oz'widget::child $this $($this,save.label) 0
oz'widget::child $this $($this,save.butt) 0
oz'widget::child $this $($this,quit.label) 0
oz'widget::child $this $($this,quit.butt) 0
oz'widget::child $this $($this,quitsave.label) 0
oz'widget::child $this $($this,quitsave.butt) 0
}
proc ~itf'quit {this} {
delete $($this,bg)
delete $($this,save.label)
delete $($this,save.butt)
delete $($this,quit.label)
delete $($this,quit.butt)
delete $($this,quitsave.label)
delete $($this,quitsave.butt)
}
proc save {this} {
set config "set soundfx_volume $::config::user::soundfx_volume\nset voice_volume $::config::user::voice_volume\nset music_volume $::config::user::music_volume\nset gamma_correction $::config::user::gamma_correction"
set fid [open "../res/user.tcl" "w"]
puts $fid $config
close $fid
oz'event {
wizDisableMouse
CloseAllInterface
}
oz'event {
oz'delay 0.5
}
oz'event {
oz'delay 0.001
}
oz'event {
saveGame
}
oz'event {
wizEnableMouse
}
}
proc quit {this} {
oz'event {
wizDisableMouse
CloseAllInterface
}
oz'event {
oz'delay 0.5
}
oz'event {
hideInterface
hideMouse
}
oz'event {
oz'delay 0.001
}
oz'event {
closeGameNoSave
}
}
proc quitsave {this} {
set config "set soundfx_volume $::config::user::soundfx_volume\nset voice_volume $::config::user::voice_volume\nset music_volume $::config::user::music_volume\nset gamma_correction $::config::user::gamma_correction"
set fid [open "../res/user.tcl" "w"]
puts $fid $config
close $fid
oz'event {
wizDisableMouse
CloseAllInterface
}
oz'event {
oz'delay 0.5
}
oz'event {
hideInterface
hideMouse
}
oz'event {
oz'delay 0.001
}
oz'event {
closeGame
}
}
proc enter {this} {
oz'mouse::cursor +100
}
proc leave {this} {
oz'mouse::cursor -100
}
}