It is currently March 29th, 2024, 8:22 am

Skin sections:Options Usage

Get help with creating, editing & fixing problems with skins
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Skin sections:Options Usage

Post by theimmersion »

I tried figuring this out by googling (reading other peoples posts and of course rainmeters manuals), experimental codes and looking at other skins but i just cant figure out how to use these: (they dont seem to have any effect)
WindowX, WindowY
AnchorX, AnchorY
AlwaysOnTop
Draggable
SnapEdges
ClickThrough
LoadOrder

What is described here: "https://docs.rainmeter.net/manual/settings/skin-sections/" just isnt working out. An example is needed there to show where to put it and how to put it and how to call it and how they behave.
Like, do i put that in skins .ini or Skins config.inc? In which section? [rainmeter] or [meter] or [section]...
I tried all of them and dont see any effect.

Now to explain, i made a suite and want to set for each skin its preferred Positioning and behavior for the end user.
To give you the idea:
A clock is aimed at being set in the top right corner, set on desktop level and should be locked for any interaction
(not draggable not clickable etc) and its load order should be 10.
The user can always manage the skin from the menu to re-position of course but it should be locked by default.

Now underneath it should be a fading skin that has images that should also be unavailable for interaction by default.
So its load order should be 1 or 0 or -1. Generally, loaded first.

With lots of skins within a suite it can get confusing to manage each skin when setting up layouts. Especially if there are a bunch of layouts option connected to the suit.
What i mean by that is that i have a skin of 5 buttons that selects predefined layouts made by me to go with suite.
Each layout has all or parts of skins loaded for different reasons.

To clarify, every button has a name:
Game Layout; -Only Skins that are essential for games are loaded. Like a steam launcher and PC performance skins.
Workspace Layout; -Only tool like skins are loaded, like a note and loup and google search skins.
Full Layout; -All of the above and some more skins like clock, weather etc.
Standard Layout; -clock, weather, search bar are lodaded but not steam launcher or PC performance.
Clear Layout. -None of the skins are loaded except the buttons for the layout to re-select.

Also, this would ease my horror of calculating the skins width and spacings to center the skin via calculations.
And also, the side effect of such calculations and setting skins X pos to center makes the skin unable to be dragged to the
left side of screen.

Im sorry if i asked a question that is dubious or answered. Im new to making and modifying skins.
And i dont post topics lightly. So believe me, i tried a bunch of solutions. And trust me, im a resourceful guy.
Sorry for the big read. Just want to be clear so that i get more chance for a startup answer that could be the solution than questions. :) THANKS! I LOVE RAINMETER!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin sections:Options Usage

Post by balala »

theimmersion wrote:Like, do i put that in skins .ini or Skins config.inc? In which section? [rainmeter] or [meter] or [section]...
None of these. The enumerated options must be used into the appropriate section (representing the skin you'd like to affect) of the Rainmeter.ini, as the first sentence sais here. To open Rainmeter.ini, right click the Rainmeter icon in system tray, then click Edit settings. Eg, if you want to affect the skin loaded from the illustro\Clock config (which is probably Clock.ini, as this config don't has another skin) add the appropriate option to the [illustro\Clock] section of the Rainmeter.ini AND restart Rainmeter, or at least refresh all.
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Skin sections:Options Usage

Post by theimmersion »

Ah, so in its current layout. Which i assume is the same like the saved layout.
So i can add those adjustments like anchor to the saved layout as well that would be shipped with the skin suite.
Thanks a lot balala! Saw your name on bunch of topics. Thanks for helping us in so many matters! :)
Blame the gremlins in my head, but thats the only place i did not try to put those in.

Just tried and the d*mn anchor works! No more messy formulas to center skins! FREEDOM! :o :D :sly: :thumbup: :great:

Believe it or not, everything else is just to get my workflow easy but those damn calculations... nightmare.
Anytime i add or remove some meter or measure, i have to adjust the calculations depending how many there are and how they used. You saved me! Now theres much more creative freedom with the workflow. Someone should add tho to the skin sections manual where the by default rainmeter.ini would be located and that the rainmeter.ini in the layout as well.
That would helped me a lot and probably would figured it out that way. But yeah, it is kind of my fault not really recognizing what the rainmeter.ini was. Now it seems so obvious... O.O
Thanks again dude! :welcome:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin sections:Options Usage

Post by balala »

You're welcome.
And don't worry, especially for a beginner, not everything is so obvious.
frikai
Posts: 2
Joined: January 22nd, 2018, 10:19 am

Re: Skin sections:Options Usage

Post by frikai »

Thanks, you have no idea how long I've been looking for this!

What I am trying to do is to have my skin automatically be anchored at a certain position when I use a specific wallpaper. Is there a way to use the AnchorX/AnchorY option with an IfCondition? Like

Code: Select all

IfCondition=(ImageName=SomeName)
IfTrueAction=[;and this is where I would like to specify the desired X/Y]

EDIT: I just realized that I can just use the !Move bang... Ah well
EDIT2: But then what would I use WindowX/Y for?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin sections:Options Usage

Post by balala »

frikai wrote:

Code: Select all

IfCondition=(ImageName=SomeName)
IfTrueAction=[;and this is where I would like to specify the desired X/Y]
This definitely doesn't work. In the IfCondition option you have to use only mathematical (numerical) expressions, which can be true or false. Checking the image name isn't allowed. For such you have to use IfMatch option.
frikai wrote:EDIT: I just realized that I can just use the !Move bang... Ah well
Using the !Move bang is one solution. Another one would be to set the X and Y values of the meter, through two !SetOption bangs. Eg, the following bangs will set the [MeterName] meter to the X=250 Y=150 position: [!SetOption MeterName X "250"][!SetOption MeterName Y "150"].
For more help, please post some code you have so far.
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Skin sections:Options Usage

Post by theimmersion »

Might i just add, top of my head:

Use this for relative positioning within the "Conditionals" / "Calc" / "SetVariable".
This should use your screen size and skin size and position it relative in percentage.

Code: Select all

; Center skin on screen on refresh action. Optional.
;OnRefreshAction=[!Move "( (#SCREENAREAWIDTH#/2)-(#CURRENTCONFIGW#/2) )" "((#SCREENAREAHEIGHT#/2)-(#CURRENTCONFIGH#/2) )"]

[Variables]
; Neat trick many dont realize or miss to use.
; Refresh based on group, and in many cases, this can be used to conditionally
; update meters and measures instead of DynamicVariables which saves PC resources.
; Always good to optimize! You can not know how many skins You gonna load. Need every bit of performance.
R=[!UpdateMeterGroup "Refresh"] [!UpdateMeasureGroup "Refresh"] [!Redraw]
; Set default percentage.
PosXp=50
PosYp=50

; Not sure if Dynamic Variables are needed here.

; Get screen width in percentage.
[CalcPosX]
Formula=(#SCREENAREAWIDTH#/100)
DynamicVariable=1

; Get screen height in percentage.
[CalcPosY]
Formula=(#SCREENAREAHEIGHT#/100)
DynamicVariable=1

; Check condition:
; Set new percentage > move skin > refresh meters/measure.
; X= (move it by x % of the screens width)-(move it left by half its width to center it).
; Y= (move it by x % of the screens height)-(move it left by half its width to center it).
[Some_Condition_Calc_Measure]
Measure=Calc
IfCondition=(some condition)
IfTrueAction=[!SetVariable PosXp "20"][!SetVariable PosYp "45"][!Move "( ([CalcPosX]*PosXp)-(#CURRENTCONFIGW#/2) )" "( ([CalcPosY]*PosYp)-(#CURRENTCONFIGH#/2) )"] #R#
IfCondition2=(some other condition)
IfTrueAction2=[!SetVariable PosXp "60"][!SetVariable PosYp "10"][!Move "( ([CalcPosX]*PosXp)-(#CURRENTCONFIGW#/2) )" "(([CalcPosY]*PosYp)-(#CURRENTCONFIGH#/2) )"] #R#
DynamicVariable=1

[Some_Meter]
; Set meters to be placed in the middle of the screen by default.
X=( ([CalcPosX]*PosXp)-(#CURRENTCONFIGW#/2) )
Y=( ([CalcPosY]*PosYp)-(#CURRENTCONFIGH#/2) )
Group=Refresh
DynamicVariable=1
Not at my PC with Rainmeter at the moment so cant test this but it should work.
This should be the base. Of course, You need to adjust it for Your own skin.
Good luck! :)

Edit:
Balala's method is also viable. It depends on how Your skin is made so use either SetOption or Move but thats on You to figure out which one is best used. My code is for the whole skin to move, but SetOption with or without Move can be used to have some meters move independently from each other. Have fun coding!