Hi~
So, this might be a bit confusing, but I was wondering if this was possible
I have SimpleSentencethree (White-Baron) modded, and have a clock that is in one sentence (one line, no clipstring).
Since it is in one line, obviously the width of the skin changes every minute.
I have this little section on my screen that I want the skin to fit in, centered.
Lets call the left coordinate (x1, y1) and the right coordinate (x2, y1). (y would be the same since it's all in one line)
Is it possible to have my time skin always be between those two coordinates on my screen, centered?
Thanks in advance~
It is currently May 6th, 2024, 8:04 pm
Just need a bit of help here: Is this possible?
-
- Posts: 23
- Joined: May 25th, 2010, 10:37 pm
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: Just need a bit of help here: Is this possible?
Try
on the string meter.
Code: Select all
X=((#x2#-#x1#)/2)
Y=#y1#
W=(#x2#-#x1#)
StringAlign=CENTER
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 23
- Joined: May 25th, 2010, 10:37 pm
Re: Just need a bit of help here: Is this possible?
Wait, I just noticed that this would be pretty easy since the coordinates I want it to be between are constants..
BUT, is there anyway I can obtain the length of the time skin each time it changes minutes/hours? I THINK the code would be something like this..?
BUT, is there anyway I can obtain the length of the time skin each time it changes minutes/hours? I THINK the code would be something like this..?
Code: Select all
X=((x2 - x1)-(length of skin at that time))/2
Y=y1
StringAlign=Center
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Just need a bit of help here: Is this possible?
MerlinTheRed's answer should work perfectly fine. You don't need the width of the string for what you want to do. This is because when StringAlign=Center is used, the string is centered on the provided x coordinate. Anotherwords, wherever the X coordinate is, that will be the center of the string.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Posts: 23
- Joined: May 25th, 2010, 10:37 pm
Re: Just need a bit of help here: Is this possible?
oh, I see
Then wouldn't it be
Also, I don't understand what the W=(#x2#-#x1#) is for...does that limit the string length to the width of the area I'm trying to put it in? Thanks~
Then wouldn't it be
Code: Select all
X=((#x2#-#x1#)/2)+x1
Y=#y1#
W=(#x2#-#x1#)
StringAlign=CENTER
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: Just need a bit of help here: Is this possible?
Yes. Since I assumed that you want the string to be limited to a certain area, I provided a width as well. You don't need to.
As for the (x2-x1)/2, that was my mistake. It should be (x1+x2)/2, which is the middle of x1 and x2.
That will center your string at the middle of x1 and x2.
As for the (x2-x1)/2, that was my mistake. It should be (x1+x2)/2, which is the middle of x1 and x2.
Code: Select all
X=((#x2#+#x1#)/2)
Y=#y1#
StringAlign=CENTER
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Just need a bit of help here: Is this possible?
Yes, you are right there. Just remember that these coordinates are for inside the skin window only. They do not apply to the overall coordinates of your screen. As far as the width goes, the string is only clipped if you use ClipString=1. Just remember that the string will get clipped by the edges of the skin window so if you don't set a height and width the skin window will be quite small.Kagelou wrote:Code: Select all
X=((#x2#-#x1#)/2+x1) Y=#y1# W=(#x2#-#x1#) StringAlign=CENTER
EDIT: All formulas for X,Y,H,W and many other areas must fully be enclosed in parenthesis.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Posts: 23
- Joined: May 25th, 2010, 10:37 pm
Re: Just need a bit of help here: Is this possible?
ok, seems like everything works as I want it!
I was just confused about whether the coordinates were relative to the screen or the window.
So does the "skin settings" in Enigma control where the skin is relative to the screen?
I was just confused about whether the coordinates were relative to the screen or the window.
So does the "skin settings" in Enigma control where the skin is relative to the screen?