It is currently November 28th, 2022, 3:25 pm

Simple countdown timer

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

Re: Simple countdown timer

Post by jsmorley »

sl23 wrote: August 5th, 2021, 12:39 pm Again, sorry, probably my fault! Should I create a new thread with any further questions?
I wouldn't... What I would suggest is that if a final resolution of this matter is ever reached, and a skin or approach that is really good is ever found, either create a "Tips & Tricks" post laying it out, or release the skin in "Share Your Creations", or both.
User avatar
sl23
Posts: 1038
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

OK, I was planning on building a basic Suite, or are there rules for that?
I mean, like, do you have to include a settings skin or make things easily editable or something?
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

sl23 wrote: August 5th, 2021, 3:56 pm OK, I was planning on building a basic Suite, or are there rules for that?
I mean, like, do you have to include a settings skin or make things easily editable or something?
If you want to. There is no rule that you have to make a settings skin. You can just take out several variables and place them in a file called Settings.inc. Users can edit that file to change settings.

Or you can make a settings menu. Depends on "Is it worth the trouble?"
Or if you want to make a settings menu quickly,
Wiki: https://github.com/sceleri/settings/wiki
Releases: https://github.com/sceleri/settings/releases/tag/v1.2
from the Realm of Death
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

sl23 wrote: August 5th, 2021, 7:13 am If that's the case, then what's the point in having those parameters in the first place? I thought that's what they were for? Strange!

Also, how is it that the previous version of the skin whose x,y parameters weren't zero didn't have this issue? Is it just a matter of too many shape meters without the x,y parameters?

So, I take it the idea is to use x,y to place the shape, then use the shapes x,y,h,w to place relative to former position? Is that how it works?

I just don't understand how it doesn't work how it should. If you create a section name all parameters under that belong to that section not a previous one, or the one after it.

So the point is, stop using the shapes parameter as its position and use the proper section x,y parameters instead? Ok, got it ;)

Thanks, hopefully that'll solve the tool tip issue. :D
As you probably found out already, in this specific case, this has to as much to do with the meter dimensions on which the tooltip is triggered (those dimensions being artificially expanded by the more or less "empty space" between the meter's X / Y and the shape's X / Y), as much as it has to do with the SolidColor / FillColor / whatever that is present in that expanded space. Take this very simple code, for example:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Meters---

[Background]
Meter=Shape
Shape=Rectangle 0,0,150,150 | Fill Color 0,0,0,1

[SomeMeter]
Meter=Shape
Shape=Rectangle 100,100,50,50
ToolTipText="Hello There!"
Tooltips.jpg
I was with the mouse on that "empty space" between (0,0) and (100,100) and the tooltip text appeared. Why? The reason is simple: even though the Shape in [SomeMeter] is drawn from (100,100) to (150,150) and because of the way shapes work the tooltip is only triggered on the opaque pixels of a shape, the fact that the underlying [Background] meter is filled with non-transparent / more or less opaque pixels makes the tooltip to be triggered on the entire area of [SomeMeter] ... which is the same as the area of [Background], since [SomeMeter] starts at the same (0,0) as [Background].

Bottom line, it's not that you shouldn't use starting shapes from other coordinates than (0,0) - as noted in the other thread, there are times when this is necessary -, it's the fact that you should be aware that there will probably be "side effects" to starting at non-zero coordinates, in certain scenarios (like this one or the one in the other thread, for example). In the end, the idea is to start at (0,0) as much as you can, and only when actually necessary start the shape from other coordinates - either way, always know doing the latter can have "unexpected" consequences. Not bad, but enough to require "fixing" the issue, as you could see. ;-)
You do not have the required permissions to view the files attached to this post.
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

Apart from Yincognito's reply,

Code: Select all

[BgAlarm]
Meter=Shape
X=7
Y=7
Shape=Ellipse 30,30,30,30 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Ellipse 30,30,21,21 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Ellipse 30,30,25,25 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!EnableMeasure mChimeHour] [!ShowMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"] [!DisableMeasureGroup ALARM] [!HideMeterGroup AlarmSet][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!DisableMeasure mChimeHour] [!HideMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!EnableMeasureGroup ALARM] [!ShowMeter HourAlarm] [!ShowMeter MinuteAlarm] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Alarm Off#CRLF#R - Alarm On"

[BgTimer]
Meter=Shape
X=167
Y=7
Shape=Ellipse 30,30,30,30 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Ellipse 30,30,21,21 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Ellipse 30,30,25,25 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"]  [!HideMeterGroup Controls][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!ShowMeterGroup Controls] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Timer Off#CRLF#R - Timer On"
See how I changed the Rectangles to Ellipse.
from the Realm of Death
User avatar
sl23
Posts: 1038
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

Thanks for the advice :thumbup:
Rest assured, credit will be given everytime :welcome:

I think I get what's happening with the shape meter. I'll probably have to come back and reread that post though! :oops:
User avatar
sl23
Posts: 1038
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

Yeah, I'll have to change all my meter's at some point, makes it easier if they're ellipse. Thank you death.crafter :thumbup:
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

sl23 wrote: August 5th, 2021, 4:36 pm Yeah, I'll have to change all my meter's at some point, makes it easier if they're ellipse. Thank you death.crafter :thumbup:
Rest assured, I've seen LOTS of other folks doing the same, i.e. use rounded rectangles when what they actually want is an ellipse. I can't explain why they think it's easier that way (maybe the abundace of rectangle examples in the manual, compared to ellipses?), but it happens... :confused:
User avatar
sl23
Posts: 1038
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

I think it's because, for me at least, that I started with a rectangle shared skin. So it was easier to copy, paste and adjust. I just tried using the ellipse and it sent my circle off the to and left! I'm assuming you need to set size as diameter?

I'll look into it and if I have an issue I'll report back. :D
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Simple countdown timer

Post by jsmorley »

sl23 wrote: August 5th, 2021, 5:19 pm I think it's because, for me at least, that I started with a rectangle shared skin. So it was easier to copy, paste and adjust. I just tried using the ellipse and it sent my circle off the to and left! I'm assuming you need to set size as diameter?

I'll look into it and if I have an issue I'll report back. :D
Keep in mind that ellipses are defined from the center out, not from the left as most other things are.

https://docs.rainmeter.net/manual/meters/shape/#Ellipse