It is currently April 27th, 2024, 11:46 pm

Possible to have only part of a skin be click-through?

Get help with creating, editing & fixing problems with skins
Sandwich
Posts: 6
Joined: December 13th, 2011, 2:00 am

Possible to have only part of a skin be click-through?

Post by Sandwich »

Just what the topic says... I've made myself a basic CPU meter with a graphic "handle" on one end to indicate "draggability". I've got it so that the rest of the skin besides the handle area isn't draggable, but ideally I'd like it if the rest of the skin were simply click-through.

Is this possible?
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Possible to have only part of a skin be click-through?

Post by smurfier »

I'm sorry but that is not possible. Click-through refers to the whole skin window and not just meters.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Possible to have only part of a skin be click-through?

Post by jsmorley »

You can't have part of a skin be fully "click through", but you can have part of the skin able to be used for dragging and part not.

Code: Select all

[Rainmeter]
DynamicWindowSize=1
BackgroundMode=1

[MeterOne]
Meter=Image
W=50
H=50
SolidColor=255,0,0,255
LeftMouseDownAction=!Execute [""]
MouseActionCursor=0

[MeterTwo]
Meter=Image
X=50
Y=50
W=50
H=50
SolidColor=0,255,0,255
MeterTwo can be used to drag the skin, but MeterOne cannot.
Sandwich
Posts: 6
Joined: December 13th, 2011, 2:00 am

Re: Possible to have only part of a skin be click-through?

Post by Sandwich »

smurfier wrote:I'm sorry but that is not possible. Click-through refers to the whole skin window and not just meters.
Can this be a feature request then? ;)
jsmorley wrote:You can't have part of a skin be fully "click through", but you can have part of the skin able to be used for dragging and part not.

*snippity-snip*

MeterTwo can be used to drag the skin, but MeterOne cannot.
Thanks - I've already got that set up using DragMargins, but it's always good to learn alternate methods. :)
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Possible to have only part of a skin be click-through?

Post by jsmorley »

Click-through is really at the "window" level, and I don't think it would be easy or practical to try to define "regions" for that functionality. You never know though.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Possible to have only part of a skin be click-through?

Post by ~Faradey~ »

Sandwich wrote:Just what the topic says... I've made myself a basic CPU meter with a graphic "handle" on one end to indicate "draggability". I've got it so that the rest of the skin besides the handle area isn't draggable, but ideally I'd like it if the rest of the skin were simply click-through.

Is this possible?
I think it's possible)
Just use bangs on meters which you want to be click-through

Code: Select all

!ClickThrough -1
from manual: http://rainmeter.net/cms/Bangs_beta

Look at the example (i didn't test it by i think it should work)

Code: Select all

[Click-Through]
Meter=Image
W=100
H=100
SolidColor=255,0,0
MouseOverAction=!ClickThrough 1
MouseLeaveAction=!ClickThrough 0

[SomeMeter]
Meter=Image
X=100
Y=100
W=100
H=100
SolidColor=0,255,255
but this means that meter you want to be click-through should have W= and H= values must be set
Sandwich
Posts: 6
Joined: December 13th, 2011, 2:00 am

Re: Possible to have only part of a skin be click-through?

Post by Sandwich »

~Faradey~ wrote: I think it's possible)
Just use bangs on meters which you want to be click-through

Code: Select all

!ClickThrough -1
from manual: http://rainmeter.net/cms/Bangs_beta

Look at the example (i didn't test it by i think it should work)

Code: Select all

[Click-Through]
Meter=Image
W=100
H=100
SolidColor=255,0,0
MouseOverAction=!ClickThrough 1
MouseLeaveAction=!ClickThrough 0

[SomeMeter]
Meter=Image
X=100
Y=100
W=100
H=100
SolidColor=0,255,255
but this means that meter you want to be click-through should have W= and H= values must be set
Tried that already; didn't work as expected. If you open the main Rainmeter and drill down to the skin in question, you can watch the "Click Through" checkbox to follow along with what happens: When you mouseover the meter, click-through gets activated, which means that your mouse is no longer over the window, which disables click-through, and so on - the "Click Through" checkbox toggles semi-randomly on and off.

I've got another question - can a measure value be used to set the position (x/y) or size (w/h) of a meter? The situation I have is a drive bar (horiz) that I'd like to have automatically sized to be as wide as the drive's capacity in GB, divided by 10. So, a 250gb drive would have a bar 25px wide, a 1.5Tb drive's bar would be 150 pixels wide, etc.

From the poking around I did, I suspect this might be easily accomplishable via an Lua script (Greek to me ATM, but so was Rainmeter code a week ago...), but I'm wondering if there's a way to accomplish the same thing with just the Calc measure and variables or something equally clever.
Last edited by Sandwich on December 13th, 2011, 9:26 am, edited 1 time in total.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Possible to have only part of a skin be click-through?

Post by ~Faradey~ »

Sandwich wrote: Tried that already; didn't work as expected. If you open the main Rainmeter and drill down to the skin in question, you can watch the "Click Through" checkbox to follow along with what happens: When you mouseover the meter, click-through gets activated, which means that your mouse is no longer over the window, which disables click-through, and so on - the "Click Through" checkbox toggles semi-randomly on and off.
i see)
well, then you can do so, i think
upd: no that not works( sorry

Code: Select all

[Click-Through]
Meter=Image
W=100
H=100
SolidColor=255,0,0
MouseOverAction=!ClickThrough 1

[SomeMeter]
Meter=Image
X=100
Y=100
W=100
H=100
SolidColor=0,255,255
MouseOverAction=!ClickThrough 0
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Possible to have only part of a skin be click-through?

Post by MerlinTheRed »

Sandwich wrote: I've got another question - can a measure value be used to set the position (x/y) or size (w/h) of a meter? The situation I have is a drive bar (horiz) that I'd like to have automatically sized to be as wide as the drive's capacity in GB, divided by 10. So, a 250gb drive would have a bar 25px wide, a 1.5Tb drive's bar would be 150 pixels wide, etc.

From the poking around I did, I suspect this might be easily accomplishable via an Lua script (Greek to me ATM, but so was Rainmeter code a week ago...), but I'm wondering if there's a way to accomplish the same thing with just the Calc measure and variables or something equally clever.
You can use dynamic variables to do this. Just use the measure's name in square brackets and add DynamicVariables=1 to the meter.

Code: Select all

[Rainmeter]
Update=1
MiddleMouseUpAction=!Refresh #CURRENTCONFIG#
DynamicWindowSize=1

[MeasureDriveSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1

[MeasureUsedDriveSpace]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1

[MeterDriveBar]
Meter=Bar
MeasureName=MeasureUsedDriveSpace
X=0
Y=0
W=([MeasureDriveSpace]/1024/1024/1024/10)
H=5
SolidColor=0,0,0
BarColor=255,255,255
BarOrientation=HORIZONTAL
DynamicVariables=1

Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
Sandwich
Posts: 6
Joined: December 13th, 2011, 2:00 am

Re: Possible to have only part of a skin be click-through?

Post by Sandwich »

MerlinTheRed wrote:You can use dynamic variables to do this. Just use the measure's name in square brackets and add DynamicVariables=1 to the meter.

*snippetty-snip*
Ahh, brilliant! Thank you ever so much - y'all are making the transition from the GUI-based Samurize to the text-based Rainmeter a lot easier, my DOS roots notwithstanding!

One final (hah!) question, math-related this time: How can I size those drive bars (natural?) logarithmically? I have everything from an 80Gb SSD to a 1.5Tb HDD. If I have the bars sized linearly, I need the 80Gb drive's bar to be a minimum of 40 pixels wide in order to have sufficient space to display the number of free GBs layered over the bar (eg. "55Gb"). At that 2:1 scale, though, the 1.5Tb drive's bar ends up being 750 pixels long, which is just slightly ridiculous.

Applying a logarithmic scale would also help for the network activity histogram, where it's often in the single-digit KB/s range, but occasionally goes up to 1.5MB/s or more. I know I have the LOG() function in the Calc measure, but I always sucked at math...