It is currently April 18th, 2024, 10:57 am

Help: Switching wallpapers with a button

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: May 13th, 2020, 9:21 pm EDIT Choice 1 not working. The arcs go everywhere...
Actually as far as I can tell, at least for me it works:
GIF.gif
However I had to add a X=5 and Y=5 options to [MeterShapes], because without these, I get the upper and left side of the skin cut off.

EDIT: In fact both codes are working same way, get the same result. However the same X and Y options had to be added on both codes.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help: Switching wallpapers with a button

Post by Yincognito »

balala wrote: May 14th, 2020, 6:08 am Actually as far as I can tell, at least for me it works:
GIF.gif
However I had to add a X=5 and Y=5 options to [MeterShapes], because without these, I get the upper and left side of the skin cut off.

EDIT: In fact both codes are working same way, get the same result. However the same X and Y options had to be added on both codes.
Well, yeah, in my samples it all works properly (bar the offset that had to be set on X and Y that I didn't bother to add since it was trivial), since the idea was to produce the same results throught 2 different methods, but in the OP's code he initially had:

Code: Select all

--- Anchors Rotation ---
AnchorX=(#EllipseCenterX#-#ArcCenterX#+#ArcRadiusX#)
AnchorY=(#EllipseCenterY#-#ArcCenterY#+#ArcRadiusY#)
which were incorrect, and that's why things were spread out everywhere. He probably set these variables trying to find out where he needs to set the center of rotation, because, as I mentioned here in the P.S., I think that the coordinates for rotations/skewing/scaling (basically all the shapes' Transform Modifiers) need to follow the same principles as in TransformationMatrix, where all transformations are relative to the top left corner of the window and not the meter itself. If so, the manual should have explicitly mentioned that, in my view.

Bottom line, if these things were "normal" (like in a Roundline meter, for example), then the center of rotation shouldn't have needed an offset on it, and would have been simply #ArcCenterX# and #ArcCenterY#, basically the same center as the ellipse. Choice 2 doesn't use the Rotate parameter of the shapes, so it's completely free of this drawback of having to set an offset to the rotation center - that's why I recommended it.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Yincognito wrote: May 14th, 2020, 9:49 am because, as I mentioned here in the P.S., I think that the coordinates for rotations/skewing/scaling (basically all the shapes' Transform Modifiers) need to follow the same principles as in TransformationMatrix, where all transformations are relative to the top left corner of the window and not the meter itself. If so, the manual should have explicitly mentioned that, in my view.
If you think so, post a request on the Site Discussion section and it'll be fixed soon, probably.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help: Switching wallpapers with a button

Post by Yincognito »

balala wrote: May 14th, 2020, 12:43 pm If you think so, post a request on the Site Discussion section and it'll be fixed soon, probably.
Well, it's not that important to worth a request just for this, but not playing before with the shape's transform modifiers I had a hard time figuring out why and by how much the center of rotation had to be modified. I knew how things worked in transformation matrices, but even though the name of the options looked similar between the two, there was no specific note that the same rules applied here.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Yincognito wrote: May 14th, 2020, 1:20 pm Well, it's not that important to worth a request just for this,
As you wish...
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

Okay so i've been upgrading the skin with rotating shapes and i'm facing several problems.

- The meter with the shapes is central in my skins and I want to add severals different meters around it. So I was kinda stuck with how I could expand the skin size. The only way I found was to set the X and Y of the first meter (the one with shapes) in the center of my screen; then I created all the others meters with .png based on this and made them the size of the screen so they could fit exactly as I want with the first metershape.
But I'm pretty sure there is another way more easier to fit and add meters to a first meter that as to be in the middle of the screen.

- I've added a meter with a bang that toggle others hidden meters of the skin with a MyVar variable. This meter should also change visual when clicking again with MyVar but nothing as well. And last problem with this one, not only the meter but the whole skin is reacting to the mouse what it shouldn't do.

I join you the whole skin so you can see for yourself.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: May 15th, 2020, 9:25 pm I join you the whole skin so you can see for yourself.
Something is not well with posted skin. In fact the it doesn't even appear on screen, especially that it has nothing to show. The complete code of NewSkin.ini is extremely simple:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]

[MeterString]
Meter=String
As said, nothing to be shown. Please check the package.
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

balala wrote: May 16th, 2020, 11:52 am As said, nothing to be shown. Please check the package.
Exact, problem when uploading.
Now it should be good.
You do not have the required permissions to view the files attached to this post.
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

I've managed to solve some of the problems I had.
But still, I have a meter with a MouseAction which works well, but not only the meter "has" the MouseAction but all the parts of the skin I click also toggles the MouseAction. I don't understand why.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: May 17th, 2020, 6:00 pm But still, I have a meter with a MouseAction which works well, but not only the meter "has" the MouseAction but all the parts of the skin I click also toggles the MouseAction.
Could you please be a little bit more precise? Don't let us to figure this out, because we can't and don't even have time for this. So, what meter are you talking about?