It is currently April 19th, 2024, 4:38 am

Hide an active skin and toggle it

Get help with creating, editing & fixing problems with skins
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Hide an active skin and toggle it

Post by Nilvarno »

Hi everyone. I have a fullscreen skin that i use like a game's dashboard which seems to be quite heavy to load and unload (the button that opens it load that skin from 0), so i was thinking to make it hidden so the skin would anyway stay loaded and possibli make it faster. How do i do that? I have to set the whole skin as hidden and ofc the button that loads it no has to toggle the hidden status. Thank you very much for your time and happy summer!
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide an active skin and toggle it

Post by balala »

Nilvarno wrote: August 14th, 2021, 9:03 am I have a fullscreen skin that i use like a game's dashboard which seems to be quite heavy to load and unload (the button that opens it load that skin from 0), so i was thinking to make it hidden so the skin would anyway stay loaded and possibli make it faster. How do i do that? I have to set the whole skin as hidden and ofc the button that loads it no has to toggle the hidden status.
If a skin is hidden it still runs, but there are no visible elements on the screen. There is no way to get it back by clicking somethin gon that skin, because it is completely hidden. You can show it for instance by clicking something on another skin. Hiding a skin is much easier, because with visible elements on the screen you can easily add a button to hide the skin.
So to create a button onto another skin to show / hide your skin, create a new config and add the following code to the newly created skin:

Code: Select all

[MeterToggleSkin]
Meter=Image
SolidColor=255,240,0
X=0
Y=0
W=25
H=15
LeftMouseUpAction=[!ToggleFade "Config"]
This button will be a simple yellow rectangle. If it does work as intended, the button can easily by modified later. Config is the config of the skin you'd like to hide / show, when clicking the button (the yellow rectangle).
In order this button to work, you have to have the appropriate skin activated. If it is not, the button won't work.
Does this work?
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Re: Hide an active skin and toggle it

Post by Nilvarno »

i'm sorry i didn't express myself very well, what you said is actually what i already sat up, another skin has the button to load/unload the other one. the code you gave ofc is what i needed, but is there a way to hide the other skin in question instead io adding hidden=1 to everything? thank you balala, it's always you who enlight me xD
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Hide an active skin and toggle it

Post by CodeCode »

I think when using !ToggleConfig the Hidden=1 are not necessary. You are toggling the entire skin which is the 'config'.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide an active skin and toggle it

Post by balala »

Nilvarno wrote: August 14th, 2021, 11:08 am but is there a way to hide the other skin in question instead io adding hidden=1 to everything?
Let's clarify first a thing: hiding a skin is not the same as hiding every meter of the skin. Adding a Hidden=1 option to all meters of the skin hides all those meters, but doesn't hide the skin itself, even if there nothing remains visible (however not even this is not always true) is still not hidden. Otherwise you can't hide the skin by adding the Hidden=1 option for instance to the [Rainmeter] section, because it doesn't work there.
To get the skin hidden from the beginning, add the following option to the [Rainmeter] section of the skin you'd like to hide: OnRefreshAction=[!Hide] or OnRefreshAction=[!HideFade] (it's entirely up to you which of these two do you prefere).
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide an active skin and toggle it

Post by balala »

CodeCode wrote: August 14th, 2021, 12:48 pm I think when using !ToggleConfig the Hidden=1 are not necessary.
!ToggleConfig and the Hidden=1 option do two different things: !ToggleConfig activates / deactivates a skin (not just hides / shows it), while the Hidden=1 option hides the meter where it is used. Hidden=1 doesn't deactivates a skin, is not even related to skin, but to meters.
CodeCode wrote: August 14th, 2021, 12:48 pm You are toggling the entire skin which is the 'config'.
Note that config and skin are two different notions:
  • The config is in fact the folder where the skin's .ini file resides.
  • The skin is the .ini file itself.
User avatar
Nilvarno
Posts: 64
Joined: March 24th, 2019, 5:52 pm

Re: Hide an active skin and toggle it

Post by Nilvarno »

It works! And it's considerably faster and smooth. Thank you very much, as always!
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide an active skin and toggle it

Post by balala »

Nilvarno wrote: August 14th, 2021, 5:11 pm It works! And it's considerably faster and smooth. Thank you very much, as always!
If you are talking about my reply, I'm glad. And you're welcome...