Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1284

Help: Rainmeter Skins • Re: Control one skin with another

$
0
0
My folder structre looks like that:

\ForumTestRun_1\main.ini (main skin)
\ForumTestRun_1\Blocky\blocky.ini (2nd skin acting like a blocking thing)

So.. I'm trying to control the main.ini with blocky.ini. Can't really explain that so here's the code:

main.ini

Code:

[Rainmeter]Update=1000[MeterMain]Meter=ShapeShape=Rectangle 0,0,460,210 |Fillcolor 113,200,153,255Hidden=0[MeterMainText]Meter=StringText=im stoopid.FontSize=30FontWeight=900
blocky.ini

Code:

[Rainmeter]Update=1000[MeterButton]Meter=ImageSolidColor=255,255,255,1Y=145X=158W=30H=30LeftMouseUpAction=[!ShowMeter MeterBlocky][!SetTransparency "20" "ForumTestRun_1"][!Update]RightMouseDownAction=[!HideMeter MeterBlocky][!SetTransparency "255" "ForumTestRun_1"][!Update][MeterButtonIMG]Meter=ImageImageName=#@#Images\control.pngY=135X=148W=50[MeterBlocky]Meter=ShapeShape=Rectangle 0,0,460,210 | Fill Color 255,255,255,1 | Strokewidth 2 | Stroke Color 255,0,0,255Hidden=1
To save you time from copying that and testing, here's a short video: https://i.imgur.com/bRorgbC.mp4

SO - it works via LeftMouseUpAction and RightMouseDownAction. My goal here is to make it work only with LeftMouseUpAction. I tried it like this:

Code:

LeftMouseUpAction=[!ToggleMeter MeterBlocky][!SetTransparency "20" "ForumTestRun_1"][!Update]
But then I couldn't figure out how to "Toggle" the Transparency thing from "20" to "255".. So yeah, here's your daily trivial thing that I tried to make work for past few hours :P If there's a simpler way of doing that, I'd love to read that ^^
  • Add a variable to the [Variables] section. For instance: Transparency=20. Obviously this will be the transparency to be set by the !SetTransparency bang.
  • Replace the above LeftMouseUpAction option by this one: LeftMouseUpAction=[!ToggleMeter "MeterBlocky"][!SetVariable X "(275-#X#)"][!SetTransparency "[#X]"][!Update].
  • Just note here that:
    • The value 275 used in the above formula is the sum of the two values between which you want to toggle.
    • I don't think the [!Update] bang is needed here. In any case if used in the \ForumTestRun_1\Blocky\blocky.ini skin, the [!Update] bang updates only the blocky.ini skin, not the main skin as well (\ForumTestRun_1\main.ini). But to the transparency setting such a bangs is not needed. To immediately see the toggle of the [MeterBlocky] meter, [!Update] is not needed, instead [!Redraw] is. So the above option should look this way: LeftMouseUpAction=[!ToggleMeter "MeterBlocky"][!SetVariable X "(275-#X#)"][!SetTransparency "[#X]"][!Redraw].
PS: If I have other problems beside this one, should I keep using that topic or create new one?
This finally is completely up to you. Generally if the question is related to the same problem, the same topic is better to be used, otherwise a new topic may be started.
PS2: If you're reading this - thank you Balala for your previous help with my "flower buttons" :D I still have them neatly waiting for me to finish that skin LOL (sorry for not responding in the old topic, but I guess I shouldn't "re-open" the old thing)
Yep, as you see, I read this. I'm always happy to help when I can. And it's not a problem you didn't reply, don't worry.
EDIT1: Forgot to add lol. That's just the basic idea, I know I could use like SolidColor thing in the bangs and it'd be much easier probably, but on the skin I'm working on there's just too much of different transparency "values" to set (it's a mess) - so the "global" transparency works for me ^^
This is again something which depends on you, as the author of the skin. You can do it as you want.

Statistics: Posted by balala — Today, 7:48 pm



Viewing all articles
Browse latest Browse all 1284

Trending Articles