so im making a bar using the nowplaying plugin using the full #screenareawidth# and ideally i would like the text of the artist and songtitle the same length apart symettrically either side of the middle icon.
obviously the text changes length for each song title and artist so how would i go about this ?
ie. not like the attached image !
many thanks in advance
It is currently May 13th, 2024, 9:58 am
screenareawidth symmetrical text query
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
screenareawidth symmetrical text query
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: screenareawidth symmetrical text query
There is no reliable way to measure the "length" of a string in Rainmeter or even Lua, so I think your best bet is to left justify (StringAlign) the artist, center the icon, and right justify the song title.
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: screenareawidth symmetrical text query
thx - i guessed you were going to say that !
could i postfix the artist meter from the song title meter and get rid of the icon - then at least it would all be centered ?
could i postfix the artist meter from the song title meter and get rid of the icon - then at least it would all be centered ?
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: screenareawidth symmetrical text query
What about centering text/icon/text on 3 points, using 1/4 of screenarea, 1/2 & 3/4s or there abouts, at least the text would orginate in the same spot every time?
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: screenareawidth symmetrical text query
Sure, you don't need to literally use postfix or prefix either.dv-ent wrote:thx - i guessed you were going to say that !
could i postfix the artist meter from the song title meter and get rid of the icon - then at least it would all be centered ?
[MeterSong]
Meter=String
X=(#SCREENAREAWIDTH# / 2)
Y=20
MeasureName=MeasureArtist
MeasureName2=MeasureTitle
StringAlign=Center
Something like that would work.
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: screenareawidth symmetrical text query
bingo !
you sir, are a legend :bow2:
you sir, are a legend :bow2:
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: screenareawidth symmetrical text query
In my own mind...dv-ent wrote:bingo !
you sir, are a legend :bow2:
Probably want to use Text= on the meter, so you can so some formatting like:
Text=%1 - %2
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: screenareawidth symmetrical text query
yup that better..
..and theres no way to put an image in the middle of Text=%1 - %2 ??
..and theres no way to put an image in the middle of Text=%1 - %2 ??
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: screenareawidth symmetrical text query
No way to "embed" it in the text, but you could center the icon behind the string meter, with an alpha set low enough that it is "faded" behind the string, or above or below the string meter with full alpha. Since the size of the icon is a "known" thing. You can easily center it as well.dv-ent wrote:yup that better..
..and theres no way to put an image in the middle of Text=%1 - %2 ??
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: screenareawidth symmetrical text query
thats ok - it wouldnt look right anyway.
but thanks again !!
...my quest for symmetry is surely a sign of OCD
but thanks again !!
...my quest for symmetry is surely a sign of OCD