It is currently April 19th, 2024, 7:16 am

Weird MouseOver behavior.

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

See if this doesn't work for you...

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
MouseScrollDownAction=[!Refresh]
MouseOverAction=[!CommandMeasure MeasureAnimation "Stop 2"][!CommandMeasure MeasureAnimation "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureAnimation "Stop 1"][!CommandMeasure MeasureAnimation "Execute 2"]

[Metadata]
Name=GoogleLauncher
Author=BananaMaster
Information=" "
Version=0.1
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
@Include=#@#Variables.ini

;====== MEASURES ======

[MeasureAnimation]
Measure=Plugin
Plugin=ActionTimer
Group=Anim
ActionList1=Repeat SlideToTheLeft, 10, 28 | Wait 5 | Repeat SlideToTheBottom, 10, 28 | SetLeft
SlideToTheLeft=[!SetVariable WOffSet "(Clamp(#WOffSet#+25,0,420))"]#U#
SlideToTheBottom=[!SetVariable HOffSet "(Clamp(#HOffSet#+25,0,180))"]#U#
SetLeft=[!SetOption Button1 MouseOverAction """[!SetOption MeterText Text #B1Text#]#U#"""]#U#
ActionList2= Wait 500 | Repeat SlideToTheTop, 10, 28 | Wait 50 | Repeat SlideToTheRight, 10, 28 | Wait 1 | Repeat ResetText, 1, 1
SlideToTheTop=[!SetVariable HOffSet "(Clamp(#HOffSet#-25,0,180))"]#U#
SlideToTheRight=[!SetVariable WOffSet "(Clamp(#WOffSet#-25,0,420))"]#U#
ResetText=[!SetOption Button1 MouseOverAction ""][!SetOption MeterText Text "Apps"]#U#
DynamicVariables=1

;======= METERS =======

[MeterSlideToBottom]
Group=Anim
Meter=Image
ImageName=#@#Images\GoogleChild2.png
X=30
Y=50
W=410
H=#HOffSet#
DynamicVariables=1
UpdateDivider=-1

[Button1]
Group=Anim
Meter=Image
ImageName=#@#Images\#B1Image#.png
X=76
Y=(#HOffSet#-40)
W=50
H=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseLeaveAction=[!SetOption MeterText Text "Apps"]#U#
DynamicVariables=1

[Button2]
Group=Anim
Meter=Image
ImageName=#@#Images\#B2Image#.png
X=40R
Y=r
W=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseOverAction=[!SetOption MeterText Text #B2Text#]#U#
MouseLeaveAction=[!SetOption MeterText Text "Apps"]#U#
DynamicVariables=1

[Button3]
Group=Anim
Meter=Image
ImageName=#@#Images\#B3Image#.png
X=40R
Y=r
W=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseOverAction=[!SetOption MeterText Text #B3Text#]#U#
MouseLeaveAction=[!SetOption MeterText Text "Apps"]#U#
DynamicVariables=1

[Button4]
Group=Anim
Meter=Image
ImageName=#@#Images\#B4Image#.png
X=40R
Y=r
W=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseOverAction=[!SetOption MeterText Text #B4Text#]#U#
MouseLeaveAction=[!SetOption MeterText Text "Apps"]#U#
DynamicVariables=1

[MeterSlideToTheLeft]
Group=Anim
Meter=Image
ImageName=#@#Images\GoogleChild1.png
X=30
Y=30
W=#WOffSet#
H=60
DynamicVariables=1
UpdateDivider=-1

[MeterText]
Group=Anim
Meter=String
FontColor=120,120,120,((#WOffSet#<=200) ? 0 : 255)
FontSize=20
StringAlign=Center
Text="Apps"
X=(#WOffSet#-170)
Y=45
AntiAlias=1
DynamicVariables=1

[GoogleParent]
Meter=Image
ImageName=#@#images\GoogleParent1.png
UpdateDivider=-1
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

I don't believe you can nest #CURRENTSECTION# in any way... It has a very, very specific meaning, that is not valid outside the section it is in, and is not subject to any "evaluation". You can't ever dynamically change the name of a [section], and there is just no need for any user-facing "resolution" of this variable. #CURRENTSECTION# can never be "set", only "used".
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Weird MouseOver behavior.

Post by kyriakos876 »

I don't want to reset to "Apps" on MouseLeave and this will work for button1 only. You can get the same issue with every button meter if you move the mouse fast enough sometimes.
jsmorley wrote:I don't believe you can nest #CURRENTSECTION# in any way... It has a very, very specific meaning, that is not valid outside the section it is in, and is not subject to any "evaluation".
but it's in the section I want it to be. Even-though it was in the wrong section it always returns something...
This is the specific application of what I mentioned. Now this should return "Button1", shouldn't it? (provided that Def=N)

Code: Select all

[Button1]
Group=Anim
Meter=Image
ImageName=#@#Images\#B1Image#.png
X=76
Y=(#HOffSet#-40)
W=50
H=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseOverAction=[!SetOption MeterText Text [#CURRENTSECTION[#Def]]]#U#
DynamicVariables=1
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

kyriakos876 wrote:I don't want to reset to "Apps" on MouseLeave and this will work for button1 only. You can get the same issue with every button meter if you move the mouse fast enough sometimes.



but it's in the section I want it to be. Even-though it was in the wrong section it always returns something...
This is the specific application of what I mentioned. Now this should return "Button1", shouldn't it? (provided that Def=N)

Code: Select all

[Button1]
Group=Anim
Meter=Image
ImageName=#@#Images\#B1Image#.png
X=76
Y=(#HOffSet#-40)
W=50
H=50
ImageAlpha=(#HOffSet#=180) ? 255 : (#HOffSet#-250)
MouseOverAction=[!SetOption MeterText Text [#CURRENTSECTION[#Def]]]#U#
DynamicVariables=1
No, you just can't nest #CURRENTSECTION# at all.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

As far as the other, I added the MouseLeaveActions, as I DID want it to reset to "Apps" when I leave an icon, that only makes sense, but by all means remove those.

I wasn't able to get any but the far-left icon to cause this issue, as it was the only one that overlapped the cursor as it was sliding down, but I will take your word for it. I guess you might have to add all of them to that SetLeft and ResetText actions in the ActionTimer then.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Weird MouseOver behavior.

Post by kyriakos876 »

jsmorley wrote:As far as the other, I added the MouseLeaveActions, as I DID want it to reset to "Apps" when I leave an icon, that only makes sense, but by all means remove those.

I wasn't able to get any but the far-left icon to cause this issue, as it was the only one that overlapped the cursor as it was sliding down, but I will take your word for it. I guess you might have to add all of them to that SetLeft and ResetText actions in the ActionTimer then.
If you add this to the code

Code: Select all

[Shield]
Meter=Image
SolidColor=0,0,0,100
W=450
H=230
and move your mouse from the bottom to the top with some speed (try to have the mouse overlapping for example the youtube meter) you should experience the issue fairly easily)

Also the reason I don't want it to change back to "Apps" everytime the mouse leaves a meter because it can be annoying while moving around from meter to meter and seeing it change to "apps" in-between.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

kyriakos876 wrote: Also the reason I don't want it to change back to "Apps" everytime the mouse leaves a meter because it can be annoying while moving around from meter to meter and seeing it change to "apps" in-between.
Fair enough, but does it make sense to have that say "Photoshop" when you are not on the icon and clicking won't run PhotoShop?

To each his own...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

I would have the icons large enough with some slack space around them, so they "abut" and you don't get a "not over any meter" in between them.

To be honest, I wouldn't have the icons driving this at all, but rather some "almost invisible" Shape meters that the icons are on top of. More code, but who cares... ;-)

Then moving left and right seamlessly transitions from one to the other, and moving off them to the top and bottom resets to "Apps".
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weird MouseOver behavior.

Post by jsmorley »

The Shape meters can just be "hidden" until the whole thing is fully "down", and they can have a static position. MouseOverAction solved...
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Weird MouseOver behavior.

Post by kyriakos876 »

Yea, that was my way to go at first, but when I started writing I got bored and I'm like, "Meh, ain't nobody got time for dat" so I went the way you saw. (Plus I'm trying to make my skins as short as possible when ti comes to lines :D )

So I suppose this: [#CURRENTSECTIO[#Def]] has no hopes of working? Even-though, I'm still curious why it returns blank when Def=N... I feel like I'm doing something that bricks the way nesting variables work, but I don't know what exactly.