home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CyberMycha 2006 April
/
SGP.iso
/
dema
/
Keepsake-Demo-en-li-v1.0.exe
/
res
/
interface
/
common
/
itf.desc.tcl
< prev
next >
Wrap
Text File
|
2005-10-30
|
9KB
|
279 lines
proc descCallBack {} {}
class itf'zoom {
proc itf'zoom {this} oz'widget {itf'zoom} {
set base "interface/[MODE]/fs"
set ($this,bg) 0
set ($this,state) ""
set ($this,currentPage) 0
set ($this,maxPage) 0
set ($this,obj) ""
oz'widget::bind $this enter itf'zoom::enter $this
oz'widget::bind $this leave itf'zoom::leave $this
set ($this,back) [new oz'button "$base/fs.back"]
set ($this,close) [new oz'button "$base/fs.close"]
set ($this,next) [new oz'button "$base/fs.next"]
oz'button::property $($this,back) -pos 0.005859 0.945313 \
-click itf'zoom::back $this -alpha 1
oz'button::property $($this,close) -pos 0.005859 0.945313 -sclick "sound/interface/backClick.ogg" \
-click itf'zoom::close $this -alpha 0
oz'button::property $($this,next) -pos 0.587891 0.945313 \
-click itf'zoom::next $this -alpha 1
oz'widget::child $this $($this,back) 0
oz'widget::child $this $($this,close) 0
oz'widget::child $this $($this,next) 0
}
proc enter {this} {
oz'mouse::cursor +100
}
proc leave {this} {
oz'mouse::cursor -100
}
proc full {this obj} {
set ($this,obj) $obj
if {[ozGet "itemCirclet"] == "pickedUp"} {
set ($this,state) "text"
} else {
set ($this,state) "rune"
}
set ($this,currentPage) 1
switch $obj {
noteBook {
set ($this,maxPage) 2
}
caretakerNote {
set ($this,state) "text"
set ($this,maxPage) 1
}
wineCaveClue {
set ($this,state) "text"
set ($this,maxPage) 1
}
tapestrySolarium {
set ($this,maxPage) 1
}
tapestryObservatory {
set ($this,maxPage) 1
}
tapestryForge {
set ($this,maxPage) 1
}
tapestryArtRoom {
set ($this,maxPage) 1
}
spellbook {
set ($this,maxPage) 1
}
orbNotes {
set ($this,maxPage) 1
}
yewlockLeavesPage {
set ($this,maxPage) 1
}
nigilisPage {
set ($this,maxPage) 2
}
headenFlowerPage {
set ($this,maxPage) 1
}
}
init $this
}
proc close {this} {
oz'widget::fadeto $this 0
}
proc back {this} {
incr ($this,currentPage) -1
if {$($this,currentPage) == 1} {
}
init $this
}
proc next {this} {
incr ($this,currentPage) 1
if {$($this,currentPage) == $($this,maxPage)} {
oz'mouse::cursor 99
}
init $this
}
proc init {this} {
set base "interface/[MODE]/fs"
if $($this,bg) {
delete $($this,bg)
}
set ($this,bg) [new oz'sprite "$base/fs.$($this,obj).$($this,state).$($this,currentPage)"]
oz'widget::property $($this,bg) -alpha 1
oz'widget::property $this -isize [oz'widget::width $($this,bg)] [oz'widget::height $($this,bg)]
oz'widget::child $this $($this,bg) 1
if {$($this,currentPage) == $($this,maxPage)} {
oz'button::disable $($this,next)
} else {
oz'button::enable $($this,next)
}
if {$($this,currentPage) == 1} {
oz'widget::alpha $($this,back) 0
oz'widget::alpha $($this,close) 1
} else {
oz'widget::alpha $($this,back) 1
oz'widget::alpha $($this,close) 0
}
}
}
class itf'desc {
proc itf'desc {this} oz'widget {itf'desc} {
set base "interface/[MODE]/desc"
set ($this,flag) ""
set ($this,obj) ""
set ($this,bg) [new oz'sprite "$base/desc.bg"]
oz'widget::child $this $($this,bg) 1
oz'widget::bind $this enter itf'desc::enter $this
oz'widget::bind $this leave itf'desc::leave $this
oz'widget::property $this -isize [oz'widget::width $($this,bg)] [oz'widget::height $($this,bg)]
set ($this,back.butt) [new oz'button "$base/desc.back"]
set ($this,zoom.butt) [new oz'button "$base/desc.zoom"]
oz'button::property $($this,back.butt) -pos 0.025391 0.270833 -click itf'desc::back $this \
-sclick "sound/interface/backClick.ogg"
oz'button::property $($this,zoom.butt) -pos 0.077148 0.270833 -disable -click itf'desc::zoom $this
oz'widget::child $this $($this,back.butt) 0
oz'widget::child $this $($this,zoom.butt) 0
set ($this,name.label) [new oz'label "name" 0.485351 0.067708]
set ($this,desc.label) [new oz'label "desc" 0.369140 0.227864]
oz'label::property $($this,name.label) -pos 0.025390 0.011718 -font system.ttf -fsize 20 -color 0.3 0.8 1
oz'label::property $($this,desc.label) -pos 0.147460 0.092447 -font system.ttf -fsize 16 -color 0.7 0.9 1
oz'widget::child $this $($this,name.label) 0
oz'widget::child $this $($this,desc.label) 0
}
proc ~itf'desc {this} {
delete $($this,bg)
delete $($this,back.butt)
delete $($this,next.butt)
delete $($this,prev.butt)
delete $($this,name.label)
delete $($this,desc.label)
}
proc addobject {this obj} {
set ($this,$obj.spr) [new oz'sprite "interface/[MODE]/desc/desc.$obj"]
oz'widget::property $($this,$obj.spr) -pos 0.006836 0.011719 -alpha 0
oz'widget::child $this $($this,$obj.spr) 0
}
proc enter {this} {
oz'mouse::cursor +100
}
proc leave {this} {
oz'mouse::cursor -100
}
proc back {this} {
MainEnableSidebar
MainEnableHelp
hide $this
if {$($this,flag) == "-inv"} {
itf'sidebar::show $::itf::sidebar
itf'sidebar::inv $::itf::sidebar
}
if {$($this,flag) == "-notebook"} {
itf'sidebar::show $::itf::sidebar
itf'sidebar::notebook $::itf::sidebar
}
if {$($this,flag) == "-callback"} {
descCallBack
}
}
proc show {this obj {flag ""}} {
set ($this,flag) $flag
set ($this,obj) $obj
MainDisableSidebar
MainDisableTalk
iactive interface.help false
ozIMenu disable help
oz'label::property $($this,name.label) -text [GetObjectName $obj]
oz'label::property $($this,desc.label) -text [GetObjectDesc $obj]
setThreadID 4
oz'event {wizDisableMouse}
oz'event {oz'delay 0.25}
oz'event {itf'inventory::showicon $::itf::inventory $obj 0.21875 0.333333}
oz'event {wizEnableMouse}
setThreadID 0
oz'widget::fadeto $this 1
switch $obj {
noteBook {oz'button::enable $($this,zoom.butt)}
caretakerNote {oz'button::enable $($this,zoom.butt)}
wineCaveClue {oz'button::enable $($this,zoom.butt)}
tapestrySolarium {oz'button::enable $($this,zoom.butt)}
tapestryObservatory {oz'button::enable $($this,zoom.butt)}
tapestryForge {oz'button::enable $($this,zoom.butt)}
tapestryArtRoom {oz'button::enable $($this,zoom.butt)}
yewlockLeavesPage {oz'button::enable $($this,zoom.butt)}
nigilisPage {oz'button::enable $($this,zoom.butt)}
headenFlowerPage {oz'button::enable $($this,zoom.butt)}
spellBook {oz'button::enable $($this,zoom.butt)}
orbNotes {oz'button::enable $($this,zoom.butt)}
default {oz'button::disable $($this,zoom.butt)}
}
if {$($this,flag) == "-callback"} {
itf'zoom::full $::itf::zoom $($this,obj)
oz'widget::fadeto $::itf::zoom 1
}
}
proc zoom {this} {
itf'zoom::full $::itf::zoom $($this,obj)
oz'widget::fadeto $::itf::zoom 1
}
proc hide {this} {
oz'widget::fadeto $this 0
itf'inventory::hideicon $::itf::inventory
}
}