Hi all,
I'm trying to define a status bar (via a .sbs) that honors the off/top/bottom setting.
Let's say (to keep the example code simple) the only thing it does is to show the text "STATUS BAR".
I managed to define the UI View port correctly (i.e. accordingly to the status bar setting).
However, the best I've been able to come up is this:
# Conditionally define UI area view port.
%Vi(t,0,8,-,-,1) # Top
%Vi(b,0,0,-,-8,1) # Bottom
%Vi(o,0,0,-,-,1) # Off
%?if(%St(statusbar), =,top)<%VI(t)|%?if(%St(statusbar), =,bottom)<%VI(b)|%VI(o)>>
# Conditionally activate top or bottom status bar.
%?if(%St(statusbar), =,top)<%Vd(x)|%?if(%St(statusbar), =,bottom)<%Vd(y)>>
%Vl(x,0,0,-,8,0)
STATUS BAR
%Vl(y,0,-8,-,8,0)
STATUS BAR
What's annoying in the above is that I have to repeat twice the definition of my status bar objects, once for view port "x" (top one) and once for view port "y".
I tried to define a single view port with it's coord conditionally defined, but that didn't work:
%Vd(z)
%Vl(z,0,%?if(%St(statusbar), =,top)<8|-8>,-,8,0)
STATUS BAR
Anybody has an idea on how to do this without duplicating the code (which is doable but annoying) ?
MaX.