Support and General Use > Theming and Appearance Customization

user defined variable's in WPS ?

(1/2) > >>

Misspell:
Id like like to set acouple different viewports widths based on Album art, if present then width will be xxx if not present then width will be yyy, is this possible ?

Right now im using %Vi(a,,,10,) and %Vi(b,,,50,) with an if condition then loading the viewpoint i need. I would like to only do a single check, set %MyWidth and then use %MyWidth through out my code.

_

[Saint]:
That seems like re-inventing the wheel to me...what you want is possible, but, is it actually needed?

example:

%?C<%Vd(small_viewport)|%Vd(big_viewport)>

Seems to be the best way to do it to me personally.

You could of course do:

%?C<%vs(MyWidth,set,0)|%vs(MyWidth,set,1)>
(or something similar, I've not long woken up)

But you're still going to have to check that variable elsewhere with something like:

%vg(MyWidth)<%Vd(small_viewport)|%Vd(big_viewport)>

Variables, in my experience, aren't the answer to simplifying things ;)
I've only ever used them in situations where it was literally impossible to achieve <effect X> in any other way.


[St.]

Misspell:
The wiki page says Skin Variables (Touchscreen only); even if i wanted to, this will not work with an iPod Video skin, correct ?

After looking at your explanation, im gonna stay with what i currently have.

I thought i could do something like (and define the variable once):
%?C<%vs(MyWidth,set,313)|%vs(MyWidth,set,180)>

Then through out my code:
%V(0,18,%vg(MyWidth),7,-)
%V(0,58,%vg(MyWidth),32,-)
etc...

But the uieditor errors out when %V uses %vg(MyWidth) as a value and the sim pukes to default skin.

Thanks for the lesson.

[Saint]:
The syntax for skin variables variables is too new for the theme-editor...
It'll barf at anything it doesn't understand, its pretty out of sync with current svn.
Any syntax added in the last ~6 months will break it.


Also...yeah, I did slip up with skin variables, apparently they are touch only but I don't immediately see why.


[St.]

JdGordon:
skin variables cant be used in viewport definitions like you want to do anyway.

edit: damn my typos

Navigation

[0] Message Index

[#] Next page

Go to full version