rez indie question Thread last updated on 2003-09-03 13:35:19

Posted by member 2018 on 2003-08-31 14:35:57

my theme howzit pro (look here http://www.litestep.net/index.php?section=2&action=details&id=185 its not the newest version as it doesn't have any IF statements for rez's)i have been working on for awhile.
right now i have the setting for each rez in IF statements.
i have multiple label that need to be resize for each rez and static sized images. all need repostioning. i can't figure out how to do it with out IF statements

Posted by member 7223 on 2003-08-31 21:12:51 link

Yes, resizing/repositioning stuff with IF statements (I mean rc If...Else...EndIf) should be tricky, and a hard-working tasks... Better use mzScript, but I can't give you example since I don't know exactly what you wanna do.

What do you mean about "static sized images" ?
Do you mean shortcut like - non resizable - images ?
In that case, my solution (there can be other, of course) is to make one image for each resolution, and call them:
- name640.png
- name800.png
- name1024.png
- ...

Then, simply load them with something like:
ModuleImage name$ResolutionX$.png


Of course, it will give headaches to multimonitor users

Posted by member 36955 on 2003-09-01 01:40:19 link

well, you can also use fancy evar math... for example:
LabelWidth "$ResolutionX/2$"

would give you a label that is half the width of the screen.
also, be sure to use negative coordinates for stuff that should be on the bottom/right edges of the screen. there are very few things that actually need if statements for resolutions; they should be avoided if possible because of the problems they cause with nonstandard resolutions and multimonitor users

Posted by member 2018 on 2003-09-01 15:55:09 link

Smurth: i mean that the images are the same size at any rez and not like you have sugggested and image for each rez.

2 end caps total 40px width
4 label seperator 52px width
4 labels + 1 lsmail ( not all the same size)to take up the rest of the screen

Posted by member 7223 on 2003-09-01 21:37:01 link

ohh, it took me some times to understand (thank to the screenshot); I'm really tired, this time...
AllLabelsWidth $(ResolutionX-288-LSMailWidth)/4$

LSMailWidth should be define first
2*40+4*52 = 288

I know you said "not all the same size". Can you precise what you means ?

Posted by member 2018 on 2003-09-02 00:09:47 link

the labels range from 10-40% of resolutionX. which i'm now use
reztrue $resolutionX- 92$
to calulate

40 is the total width of the end caps
52 is the total width of the seperators (dots)

hence 92

Posted by member 2018 on 2003-09-02 00:09:55 link

double post deleted

Posted by member 2018 on 2003-09-02 00:10:08 link

triple post deleted

Posted by member 2018 on 2003-09-02 00:10:44 link

grr oops damn time out

Posted by member 7223 on 2003-09-02 01:11:48 link

I definitely don't understand what you mean. Sorry

Posted by member 2018 on 2003-09-03 01:20:37 link

hmm... ok
first off i have been trying to figure it how it do it and i convert all pixel sizes to percents of screen width

so the amplabel is about 10%
tasklabel is about 20%
lsmail about 10%
vwmlabel about 10%
w5label about 40%

leaving about 10% for the endcaps and dots

the problem is and different rez's the endcaps and dots take a great percent. At this point i look at any solution pix or percent or whatever

i hope this explained this well enough
if not i'll post again

Posted by member 1 on 2003-09-03 02:09:06 link

I haven't used the math stuff before...but would something like this be possible? 20 being with given width for endcaps and dots.

x $resolutionX - 20$
AmpLabelX $x*.10$

Posted by member 37809 on 2003-09-03 07:33:12 link

yup Dev :d

If the ends look weird with percentual widths, then have the ends fixed-width. You could do just those with If-thens. Then you have $ResolutionX-(widthOfEverythingButTheLabels)$ leftover. Because of the roundoff errors with using percents, you should leave one of the labels to have a width as a function of the space for all labels ($resolutionx-allends$) minus the percentual widths of the rest of the labels. Go left to right to make it easier.

leftEndw 50
rightEndw 50
leftEndx 0
rightEndx $ResolutionX-rightEndw$

dotWidth 10

; two ends, three dots
labelSpace $ResolutionX-leftEndw-rightEndw-3*dotWidth$

labelAx $leftEndW$
labelAw $0.1*labelSpace$

dot1x $labelAx+labelAw$

labelBx $dot1x+dotWidth$
labelBw $0.2*labelSpace$

dot2x $labelBx+labelBw$

labelCx $dot2x+dotWidth$
labelCw $0.1*labelSpace$

dot3x $labelCx+labelCw$

labelDx $dot3x+dotWidth$
labelDw $labelSpace-(labelAw+labelBw+labelCw)$

untested, but looks like you can do something similar?

Posted by member 2018 on 2003-09-03 13:35:19 link

this looks like what i'm looking for. i'll try it as soon as i get the chance.

the sad thing is now that i see it. i go "i should of thought of that", i'm normally good with math. guess i'll never be a great themer, oh well i make them mostly for me anyway.

thanks

P.S. i think this should go in the code section at least tnl's reply