It is currently March 28th, 2024, 5:59 pm

Set X/Y for @Include.inc

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Set X/Y for @Include.inc

Post by sl23 »

Is it possible to create a smaller skin with X/Y positions then reposition that complete skin within another skin and reposition it as a whole?

So for example:
Skin 1 is a Roundline with a relative positioned text meter
Skin 2 is an icon with a text meter.
etc...

The main skin then has something like:
@Include=Skin1.inc
@Include2=Skin2.inc

But then allow each to be positioned next to each other, for example.
So although Skin1.inc has X/Y set, it's relative to it's own 'skin' file, if that makes sense.

Sorry if this explanation is poor, I'm not sure how else to put it.
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Re: Set X/Y for @Include.inc

Post by deflore08 »

Hello! If you including something in your Skin.ini (for example) and included files contains something what have bigger dimensions, Skin.ini will get new maximums of (x,y) according to included files. I want to say, if your main skin have 100x100 size, and you including into this file Include1.inc which contains circle 300x300, you main skin will be resized to 300x300. Sorry for poor explanation, but there is no way to avoid this. At least as i know.

You may just scale dimensions of your items inside your includes. Just use formulas in dimension definition, for example:

Code: Select all

[Variables]
Muptiplier=2

[meter]
H=(200 / #Multiplier#)
W=(200 / #Multiplier#)
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Re: Set X/Y for @Include.inc

Post by deflore08 »

Oh, looks i misunderstood the question. It seems you want to have secondary skins as relative to each other but want to keep it included in main skin? As i know included skins have the same zero point as parent skin, so.. I hopes sages have solution for this. :(
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Set X/Y for @Include.inc

Post by sl23 »

Thanks for the feedback, but yes, this is just for positioning, not sizes. :D
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set X/Y for @Include.inc

Post by balala »

deflore08 wrote: October 9th, 2021, 2:54 pm Hello! If you including something in your Skin.ini (for example) and included files contains something what have bigger dimensions, Skin.ini will get new maximums of (x,y) according to included files. I want to say, if your main skin have 100x100 size, and you including into this file Include1.inc which contains circle 300x300, you main skin will be resized to 300x300. Sorry for poor explanation, but there is no way to avoid this. At least as i know.
Unless there is a SkinWidth and / or SkinHeight option defined on the [Rainmeter] section of the main skin. But as yourself have remarked, this was not the question.
sl23 wrote: October 9th, 2021, 2:30 pm But then allow each to be positioned next to each other, for example.
There is a solution, I think. Add to any measure of your main skins the following two options:

Code: Select all

[Measure1]
...
OnUpdateAction=[!Move "(#CURRENTCONFIGx#+#CURRENTCONFIGWIDTH#)" "#CURRENTCONFIGY#" "CONFIG-OF-FOLLOWER-SKIN"]
DynamicVariables=1
With this, the seconds skin will be positioned right next to the main skin. Obviously you can play with the formulas used in the !Move bang. Don't forget to add the config of the "follower" skin as the third parameter of the !Move bang.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Set X/Y for @Include.inc

Post by SilverAzide »

sl23 wrote: October 9th, 2021, 2:30 pm Is it possible to create a smaller skin with X/Y positions then reposition that complete skin within another skin and reposition it as a whole?
The short answer is no.

Just because you have individual include files does not mean they are individual "skins". There's only one skin, so it's no different than combining them all into a single .ini file.

By using includes you can do tricky things like making skins modular with shared components, but it's all one skin to Rainmeter.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Set X/Y for @Include.inc

Post by sl23 »

Thought as much, but balala's idea looks like it's worth investigating :thumbup:
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: Set X/Y for @Include.inc

Post by death.crafter »

sl23 wrote: October 9th, 2021, 2:30 pm
Interchange the modules to see how it works:
ModulePositioning_1.0.rmskin
(10.46 KiB) Downloaded 6 times
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Set X/Y for @Include.inc

Post by sl23 »

Good effort, but the idea is to use the Parent.ini to adjust the positions without having to use Relative positioning within the Module.inc files. So think this is a no! :-(
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: Set X/Y for @Include.inc

Post by death.crafter »

sl23 wrote: October 9th, 2021, 8:36 pm Good effort, but the idea is to use the Parent.ini to adjust the positions without having to use Relative positioning within the Module.inc files. So think this is a no! :-(
Hmm. Well if you think so. But you can keep a parent ini with ParentLeft And ParentBottom meter and make your modules relative to that.

If you want like a skin mover that moves all your required skins all together then I have a plugin for that. See this post:
https://forum.rainmeter.net/viewtopic.php?t=38614

If you want to use it let me know. But you have to use it in conjunction with mouse plugin so yeah it's a bit of work.

But yeah, I can make a lua script that does it too. But it will require you to adapt all your skins to it.

In the end it's your choice.
Post Reply