It is currently March 29th, 2024, 12:17 am

Show Multiple Skins on Mouse Hover

Get help with creating, editing & fixing problems with skins
Steamfox
Posts: 3
Joined: April 29th, 2017, 6:10 pm

Show Multiple Skins on Mouse Hover

Post by Steamfox »

Hey folks,

I want to make it so that when my mouse hovers over one skin, some other skins will appear, and when my mouse goes off the skin, they other skins disappear. I've got it working where one of the other skins will appear, but I can't figure out how to make multiple skins appear.

I also want to make it so that there's a delay before the skins disappear when the mouse leaves the first skin.

Here is the parent skin:

Code: Select all

[Rainmeter]
Update=1000

[ImageLaunch]
Meter=Image
W=269
H=79
ImageName=#@#Images\Adventure.png

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho2.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho2.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho3.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho3.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho4.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho4.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "NoMansSky.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "NoMansSky.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "Undertale.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "Undertale.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho5.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho5.ini"]

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "Unravel.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "Unravel.ini"]
And here is one of the child skins:

Code: Select all

[Rainmeter]
OnRefreshAction=!ZPos "-2"

[ImageLaunch]
Meter=Image
ImageName=#@#Images\Icons\DW1.png
MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"]
LeftMouseUpAction=["C:\Program Files (x86)\Legacy Games\Doctor Who Ep 1 - City of the Daleks\DoctorWho_Pc.exe"]
My big issue is that only the first child skins work, the DoctorWho1.ini one. That's because it's the first one in the long list of MouseOverActions, so I'd like to make all of the MouseOverActions work.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Show Multiple Skins on Mouse Hover

Post by fonpaolo »

You simply can't use more than one MouseOver and/or MouseLeave actions in one meter.

The solution is simple, add all the other commands to the first MouseOver and MouseLeave. ;-)
Steamfox
Posts: 3
Joined: April 29th, 2017, 6:10 pm

Re: Show Multiple Skins on Mouse Hover

Post by Steamfox »

fonpaolo wrote:You simply can't use more than one MouseOver and/or MouseLeave actions in one meter.

The solution is simple, add all the other commands to the first MouseOver and MouseLeave. ;-)
I've already tried that - it makes the 1st skin show up, disappear, and then the second skin show up. Even when I'm having my mouse on the parent skin. It goes from one !ActivateConfig to the next one, making it so that only one skin is showing at once.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Show Multiple Skins on Mouse Hover

Post by balala »

Steamfox wrote:I want to make it so that when my mouse hovers over one skin, some other skins will appear, and when my mouse goes off the skin, they other skins disappear. I've got it working where one of the other skins will appear, but I can't figure out how to make multiple skins appear.
As fonpaolo said, none option can be used more times, on the same section (meter, measure or any other section, like [Rainmeter]). Adding all bangs to the same MouseOverAction, respectively MouseLeaveAction will work, however with this approach, you can't add delay between the skin appearing. Another approach will be needed for this.
First let's see how to add those bangs into one single pair of MouseOverAction / MouseLeaveAction options:

Code: Select all

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho2.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho3.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho4.ini"][!ActivateConfig "Simply\Adventures\Apps" "NoMansSky.ini"][!ActivateConfig "Simply\Adventures\Apps" "Undertale.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho5.ini"][!ActivateConfig "Simply\Adventures\Apps" "Unravel.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"]
Note the following important mistake you made: the !DeactivateConfig bang doesn't need a second parameter (the name of the file), beside the config name (the first parameter). The !ActivateConfig bang does need it (because if you have in a config more then one single ini files, Rainmeter can't decide which one would you like to load), but the !DeactivateConfig one, doesn't need. Simply it'll deactivate (unload) the currently loaded skin.
Steamfox wrote:I also want to make it so that there's a delay before the skins disappear when the mouse leaves the first skin.
Now about the delay: definitely not impossible, but neither simple isn't. You need some additional measure, to handle when and which skin will be loaded. I'm working on it, will come back soon with a not too simple solution.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Show Multiple Skins on Mouse Hover

Post by fonpaolo »

Thanks balal, but I think there's another problem, for what I can see, all the "DoctorWhoX.ini" are in the same folder...
If it's so, that's the reason Steamfox is experiencing the skins appear and then disappear. :?

In no way you can load different skins from a folder, Rainmeter treats them as variants of the same skin.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Show Multiple Skins on Mouse Hover

Post by balala »

Steamfox wrote:I've already tried that - it makes the 1st skin show up, disappear, and then the second skin show up. Even when I'm having my mouse on the parent skin. It goes from one !ActivateConfig to the next one, making it so that only one skin is showing at once.
One very - very important thing I just figured out right now: at once, just one single ini file can be loaded from the same config (folder). It seems that, at least according to the posted code, all ini files are located into the same config (Simply\Adventures\Apps). This means there is no solution to load multiple skin. Eg if you load manually the DoctorWho1.ini, then want to load the second one (DoctorWho2.ini), this second skin will load, but this action will unload the first loaded skin (in this case DoctorWho1.ini).
The solution of this problem would be to create eight configs (folders) and move each ini file into a different one. I mean something like the following structure:

Code: Select all

Simply\Adventures\Apps\DoctorWho1\DoctorWho1.ini
Simply\Adventures\Apps\DoctorWho2\DoctorWho2.ini
Simply\Adventures\Apps\DoctorWho3\DoctorWho3.ini
Simply\Adventures\Apps\DoctorWho4\DoctorWho4.ini
Simply\Adventures\Apps\NoMansSky\NoMansSky.ini
Simply\Adventures\Apps\Undertale\Undertale.ini
Simply\Adventures\Apps\DoctorWho5\DoctorWho5.ini
Simply\Adventures\Apps\Unravel\Unravel.ini
See that I placed each ini file into a different folder. As I said, if you leave all ini files into the same folder, you won't be able to load more then one at the same time. Doesn't matter how these newly created folders are structured, important is to have all ini files into different folders, to can load them simultaneously.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Show Multiple Skins on Mouse Hover

Post by balala »

fonpaolo wrote:Thanks balal, but I think there's another problem, for what I can see, all the "DoctorWhoX.ini" are in the same folder...
If it's so, that's the reason Steamfox is experiencing the skins appear and then disappear. :?

In no way you can load different skins from a folder, Rainmeter treats them as variants of the same skin.
True! That's exactly what I figured out right now. Very important thing!!!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Show Multiple Skins on Mouse Hover

Post by jsmorley »

Steamfox
Posts: 3
Joined: April 29th, 2017, 6:10 pm

Re: Show Multiple Skins on Mouse Hover

Post by Steamfox »

balala wrote:As fonpaolo said, none option can be used more times, on the same section (meter, measure or any other section, like [Rainmeter]). Adding all bangs to the same MouseOverAction, respectively MouseLeaveAction will work, however with this approach, you can't add delay between the skin appearing. Another approach will be needed for this.
First let's see how to add those bangs into one single pair of MouseOverAction / MouseLeaveAction options:

Code: Select all

MouseOverAction=[!ActivateConfig "Simply\Adventures\Apps" "DoctorWho1.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho2.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho3.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho4.ini"][!ActivateConfig "Simply\Adventures\Apps" "NoMansSky.ini"][!ActivateConfig "Simply\Adventures\Apps" "Undertale.ini"][!ActivateConfig "Simply\Adventures\Apps" "DoctorWho5.ini"][!ActivateConfig "Simply\Adventures\Apps" "Unravel.ini"]
MouseLeaveAction=[!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"][!DeactivateConfig "Simply\Adventures\Apps"]
Note the following important mistake you made: the !DeactivateConfig bang doesn't need a second parameter (the name of the file), beside the config name (the first parameter). The !ActivateConfig bang does need it (because if you have in a config more then one single ini files, Rainmeter can't decide which one would you like to load), but the !DeactivateConfig one, doesn't need. Simply it'll deactivate (unload) the currently loaded skin.

Now about the delay: definitely not impossible, but neither simple isn't. You need some additional measure, to handle when and which skin will be loaded. I'm working on it, will come back soon with a not too simple solution.
That and the different folders are exactly what I needed! Thank you! This issue has been bugging me for a few days for a while, so thank you for helping!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Show Multiple Skins on Mouse Hover

Post by jsmorley »

The concept of "config" is fundamental to Rainmeter. We call them "skins" (for some reason lost in antiquity), but really what Rainmeter deals with, what the basic element of Rainmeter is, is a "config". A config is a single folder somewhere under the ...Documents\Rainmeter\Skins\ directory, and it can contain one or more skin .ini files. Those are most accurately referred to as "variants", particularly if there is more than one in the folder.

Only one "variant" can be loaded from a single config folder at a time. Again,that is just fundamental to Rainmeter. Everything it does, all the bangs like !Refresh and !Move and even !UpdateMeter are based on, and support parameters for, a "config".

Almost nothing in Rainmeter knows or cares "which" skin .ini file, which "variant" is loaded from the config.

So you might have a config folder called "Clocks" and in that you might have two skin "variants". ClockBlack.ini and ClockWhite.ini. When you, or a user, loads your skin, they will chose one of those variants to load. Again, only one can be loaded at at time. If you load the black clock, the white clock will be unloaded first. In any case, any action you take on the skin from then on doesn't care a bit if the black or white variant is loaded. Rainmeter only knows that it should act on the "config", which is called "Clocks".

So about that Almost... There are two cases where Rainmeter will know and care which particular "variant", which .ini skin file, you are acting on. They are !ActivateConfig, where you need to be specific about which variant you want to load, and !WriteKeyValue, which by default will write to the .ini file of the currently loaded variant if not told otherwise.

We have wished over and over again that the terminology for Rainmeter wasn't so obtuse. It's a big hurdle for a new user, and that is regrettable. There is really nothing we can easily do about that though. Much of it is baked into the DNA of Rainmeter, and the combination of that, and the long history of using the current terminology everywhere folks talk about Rainmeter would make any kind of transition both difficult, and probably more confusing (at least in the short to mid term) than it is worth.

I personally blame the entire concept of "variant". If we had a time machine, that entire idea would be implemented over my dead body. It's the root cause of 90% of the confusion and complexity with terminology. From that flows the concept of "config" and all the layers of crap folks have to understand. Sadly, we don't have a time machine however...