Quantcast
Viewing all articles
Browse latest Browse all 705

Help: Rainmeter Skins • Re: Creating a scrollable list of meters?

I assume it's a matter of replacing what is shown in each meter by somehow replacing it with the one above, or below, depending scrolling direction. Is that the simplest way to do so?
That is, more than likely, the hardest possible way to do it. RainMeter really isn't geared for scrollable content of this kind due to a lack of nestable containers and viewports. Either of which would make this trivial. That being said it is still possible with what it does provide.

To make this work you need <1> to be able to move around content without too much hassle and <2> be able to clip content of what is or is not visible.
The first can be done with relative positioning. Move just one meter and all the others will follow it around. If we use a container we can clip content which is out of bounds mimicking a viewport.

I wrote up an example using seven meters so you can see how it works. There may be a better way to do it though. I am still relatively new to RainMeter myself.

Code:

; ========================================================================================================[Rainmeter]Update=250[Metadata]Name=Author=Information=Version=License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0; ======================================================================================================== MainCode; ======================================================================================================== ; ======================================================================================================== Containers[Variables];; Starting position of first meter 0 index.  Number can range from -2 to 0.;PositionY=0;; Each meter is 20px in height.  We will show five meters at a time so container needs to be 100px in height.; We have, in total, seven meters so we need to be able to scroll >>2<< off the container bounds.;[MeterContainer]Meter=ShapeShape=Rectangle 0,0,200,100 | Fill Color 255,255,255,255; allow to scroll up/down two positionsMouseScrollUpAction=[!SetVariable PositionY (Clamp(#PositionY#+1,-2,0))][!UpdateMeter Meter1][!Redraw]MouseScrollDownAction=[!SetVariable PositionY (Clamp(#PositionY#-1,-2,0))][!UpdateMeter Meter1][!Redraw]DynamicVariables=1; ======================================================================================================== Measures; ======================================================================================================== Meters[Meter1]Meter=StringContainer=MeterContainerText=Meter 1SolidColor=240,240,240,255X=0rY=(#PositionY#*20)W=200H=20DynamicVariables=1;; All futher meters placed relative to the previous so when [Meter1] moves all the others follow;[Meter2]Meter=StringContainer=MeterContainerText=Meter 2SolidColor=224,224,224,255X=0rY=0RW=200H=20[Meter3]Meter=StringContainer=MeterContainerText=Meter 3SolidColor=208,208,208,255X=0rY=0RW=200H=20[Meter4]Meter=StringContainer=MeterContainerText=Meter 4SolidColor=192,192,192,255X=0rY=0RW=200H=20[Meter5]Meter=StringContainer=MeterContainerText=Meter 5SolidColor=176,176,176,255X=0rY=0RW=200H=20[Meter6]Meter=StringContainer=MeterContainerText=Meter 6SolidColor=160,160,160,255X=0rY=0RW=200H=20[Meter7]Meter=StringContainer=MeterContainerText=Meter 7SolidColor=144,144,144,255X=0rY=0RW=200H=20

Statistics: Posted by Pickles7853 — Yesterday, 6:34 pm



Viewing all articles
Browse latest Browse all 705

Trending Articles