hi
in the last weeks, i was working on the gui, it is more complicated then i thought but i'm now supporting almost all the features. the best way to explain what this .gui file can do is by giving an example so here is one:
windowDef Desktop
{
rect 0,0,640,480
backcolor 0,0,0,1
visible 1
windowDef raven
{
rect 120,40,400,400
visible 1
background "gfx/guis/mainmenu/raven_1"
matcolor 0,0,0,1
}
}
the system based on nested windows and events. there is one top level window called 'Desktop' then one or more windows that are 'children' of the desktop, then zero or more windows that are children of the children, etc... (every window/event has it own params)
here we define the top must window 'Desktop' positioned at 0,0 with size of 640 n 480 (width and height), we set his background color to black and make sure he is visible.
we then create a second window, which is child on desktop positioned at 120,40 with size 400,400, make sure this one also visible and also set his background image to some texture.
'matcolor' is texture color, so here we set it to black so later we could create a transition effect so it fades in and out.
the lines below define transitions on texture color of raven window (they should be inside 'Desktop' brackets)
windowDef anim_credits
{
rect 0,0,1,1
visible 1
notime 0
onTime 0 {
transition "raven::matcolor" "0,0,0,1" "0.839,1,0.658,1" "1000" ;
}
onTime +3000 {
transition "raven::matcolor" "0.839,1,0.658,1" "0,0,0,1" "1000" ;
}
}
ok, i said we could define some events so here we define the 'onTime' events which runs the actions/sets inside is brackets every T+
No comments:
Post a Comment