hyprdmg wrote: ↑January 14th, 2020, 4:51 pm
I've tried to use the update at 1000 a few times with some of the redraws, but it still seems to be giving me issues with some of the text not appearing right away, so for now I'm sticking with 50 as it doesn't seem to be putting me higher than 3% CPU, and that's only when mousing over multiple texts rapidly.
I did, however, move the
[!UpdateMeter "#CURRENTSECTION#"][!Redraw] section to the
StyleString section, and that helped reduce a lot of the code for all the links.
Probably it doesn't load the CPU too much, however I still think the default
Update=1000 is a better option. To make it to work more quicker, you have to update some measures and meters. Here is what you can do.
First replace the
Update=50 with
Update=1000. I'm sorry I still insist on this, but for the skins controlled by mouse, there is no reason to have such a low Update.
Add a
Group=Items option to the [StringStyle] section (take care it is [StringStyle], not [StyleString]).
Finally add the
[!UpdateMeasure "MeasureFolder"][!UpdateMeasure "m#CURRENTSECTION#"][!UpdateMeterGroup "Items"][!Redraw] bangs to the end of LeftMouseUpAction options of all meters from [Link1] to [Link40]. For instance the LeftMouseUpAction option of [Link1] will become:
Code: Select all
[Link1]
...
LeftMouseUpAction=[!CommandMeasure mLink1 FollowPath][!UpdateMeasure "MeasureFolder"][!UpdateMeasure "m#CURRENTSECTION#"][!UpdateMeterGroup "Items"][!Redraw]
Does it work quicker now?
hyprdmg wrote: ↑January 14th, 2020, 4:51 pm
I also added a timer to the skin to return to the original path after a set time. I had to include a workaround for the skin if it was already at the top level. I'm sure the code is a bit sloppy, but getting it to work was pretty fun.
No need for the [Reset2] measure. Generally speaking, the less measures, the better it is. So you can completely renounce to this useless measure and check the value of the #TopCheck# variable directly into the IfCondition options of [ResetTimer] measure. Also note that I'd add a Limit (or whatever) variable to the [Variables] section, which is the time limit after that the skin resets and would use this into the measure. The advantage is that changing the limit is much easier if anytime later you want to change it:
Code: Select all
[Variables]
...
Limit=20
...
[ResetTimer]
Measure=Calc
Formula=(ResetTimer+1)*#Reset#
MaxValue=155
IfCondition=(ResetTimer >= #Limit#) && (#TopCheck# = 1)
IfTrueAction=[!SetVariable Reset 0]
IfCondition2=(ResetTimer >= #Limit#) && (#TopCheck# = 0)
IfTrueAction2=[!CommandMeasure mLink1 FollowPath][!SetVariable Reset 0]
DynamicVariables=1
;[Reset2]
;Measure=Calc
;Formula=#TopCheck#
;DynamicVariables=1