It is currently March 28th, 2024, 11:04 am

New Container meter option

Changes made during the Rainmeter 4.3 beta cycle.
User avatar
JosephB2000
Posts: 155
Joined: July 29th, 2014, 7:02 pm

Re: New Container meter option

Post by JosephB2000 »

I understand that perfectly, but my issue is this:

If we use this code
[Rainmeter]

[Background]
Meter=String
W=200
H=100
SolidColor=0,0,0
LeftMouseUpAction=[!ShowMeterGroup GroupContainer][!Redraw]

[ContainerMeterVisible]
Meter=String
X=20
Y=10
W=160
H=80
SolidColor=255,0,0
Group=GroupContainer
Hidden=1
then the red square appears instantly once I press the Background meter. But if I then add these two meters
[ContainerMeter]
Meter=String
X=r
Y=r
W=160
H=80
SolidColor=0,0,0
Group=GroupContainer
Hidden=1

[ContainedString]
Meter=String
X=30
Y=10
W=100
H=60
SolidColor=0,255,0
Container=ContainerMeter
at the end of the skin's .ini, then it updates after 1 second as you said... Furthermore, I just found that if I click the background twice before it updates, the skin actually disappears until it updates.

This to me is strange as simply adding the container and contents somehow changes when the skin updates (I am not educated in this matter at all). And again, the skin disappearing after a double click is also strange...
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Container meter option

Post by balala »

JosephB2000 wrote: April 8th, 2019, 8:42 pm I understand that perfectly, but my issue is this:

If we use this code
[Rainmeter]

[Background]
Meter=String
W=200
H=100
SolidColor=0,0,0
LeftMouseUpAction=[!ShowMeterGroup GroupContainer][!Redraw]

[ContainerMeterVisible]
Meter=String
X=20
Y=10
W=160
H=80
SolidColor=255,0,0
Group=GroupContainer
Hidden=1
then the red square appears instantly once I press the Background meter. But if I then add these two meters
[ContainerMeter]
Meter=String
X=r
Y=r
W=160
H=80
SolidColor=0,0,0
Group=GroupContainer
Hidden=1

[ContainedString]
Meter=String
X=30
Y=10
W=100
H=60
SolidColor=0,255,0
Container=ContainerMeter
at the end of the skin's .ini, then it updates after 1 second as you said...
Yes, because when you click, showing up the meters belonging to the GroupContainer meter group, you don't get them visible until the container meter isn't updated. In first code you don't encounter such issues, because there is no container.
In the second code you can get visible the revealed parts of meters if you update the container meter: LeftMouseUpAction=[!ShowMeterGroup GroupContainer][!UpdateMeter ContainerMeter][!Redraw]. Without this !UpdateMeter bang, you make visible the parts of meters revealed by the container, but since the container isn't updated, you don't see them until you get it updated. This is where the newly added !UpdateMeter bang helps.
JosephB2000 wrote: April 8th, 2019, 8:42 pm And again, the skin disappearing after a double click is also strange...
Yes, this is right and weird to me too. Can't explain what's going on.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Container meter option

Post by jsmorley »

Yes, that is quite odd. Something about the two !ShowMeter bangs or the two !Redraw bangs, or both, is causing an issue when they are executed twice before the skin is updated.

Double-click the skin:

Code: Select all

[Rainmeter]
Update=3000

[Background]
Meter=String
W=200
H=100
SolidColor=0,0,0
LeftMouseUpAction=[!ShowMeterGroup GroupContainer][!Redraw]

[ContainerMeterVisible]
Meter=String
X=20
Y=10
W=160
H=80
SolidColor=255,0,0
Group=GroupContainer
Hidden=1

[ContainerMeter]
Meter=String
X=r
Y=r
W=160
H=80
SolidColor=0,0,0
Group=GroupContainer
Hidden=1

[ContainedString]
Meter=String
X=30
Y=10
W=100
H=60
SolidColor=0,255,0
Container=ContainerMeter

Now of course this should be:

LeftMouseUpAction=[!ShowMeterGroup GroupContainer][!UpdateMeter *][!Redraw]

As that is the behavior you are looking for, and entirely solves the "blinking" problem since a second action can't happen before the meters are updated, but it's still sorta odd.
Post Reply