Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1538

Help: Rainmeter Skins • Re: Use shape meter in place of SolidColor

$
0
0
One can have a single and dynamic Shape meter and just change the rounded rectangle's coordinates either by !SetOption the entire Shape option directly, by !SetVariable some variables already used in that Shape option to draw the rectangle in the desired position, or by simply !SetOption the X and Y of the Shape meter itself. Took one of my sample skins from another thread and adjusted it to illustrate the simpler 3rd choice (see the mouse actions in the Texts style, and also the BackOne meter - most variables are self explanatory and not really needed, they come from the original version of this sample skin):

Code:

[Variables]HighlightColor=64,128,255,128FontFace=ConsolasFontSize=12LineW=300LineH=19StrokeW=2LineGap=5Corner=6FolderPath="%USERPROFILE%\Desktop"Lines=3[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1---Measures---[Folder]Measure=PluginPlugin=FileViewPath="#FolderPath#"ShowDotDot=1ShowFolder=1Count=#Lines#FinishAction=[!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw]UpdateDivider=-1[ElementName1]Group=ElementsMeasure=PluginPlugin=FileViewPath=[Folder]Type=FileNameIndex=1[ElementName2]Group=ElementsMeasure=PluginPlugin=FileViewPath=[Folder]Type=FileNameIndex=2[ElementName3]Group=ElementsMeasure=PluginPlugin=FileViewPath=[Folder]Type=FileNameIndex=3---Styles---[Texts]X=(#StrokeW#+#LineGap#)Y=(#LineGap#)RW=(#LineW#)FontEffectColor=0,0,0,255FontColor=255,255,255,255StringEffect=ShadowFontFace=#FontFace#FontSize=#FontSize#AntiAlias=1ClipString=1MouseOverAction=[!SetOption BackOne X [#CURRENTSECTION#:X]][!SetOption BackOne Y [#CURRENTSECTION#:Y]][!SetOption BackOne Hidden 0][!UpdateMeter BackOne][!Redraw]MouseLeaveAction=[!SetOption BackOne X [#CURRENTSECTION#:X]][!SetOption BackOne Y [#CURRENTSECTION#:Y]][!SetOption BackOne Hidden 1][!UpdateMeter BackOne][!Redraw]DynamicVariables=1---Meters---[BackAll]Meter=ShapeShape=Rectangle (#StrokeW#/2),(#StrokeW#/2),(#StrokeW#+#LineGap#*2+#LineW#),(#StrokeW#+#LineGap#+(#LineH#+#LineGap#)*#Lines#),#Corner# | StrokeWidth #StrokeW# | Stroke Color 255,255,255,128 | Fill Color 0,0,0,128UpdateDivider=-1MouseScrollUpAction=[!CommandMeasure Folder "IndexUp"][!UpdateMeasure Folder][!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw]MouseScrollDownAction=[!CommandMeasure Folder "IndexDown"][!UpdateMeasure Folder][!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw]DynamicVariables=1[BackOne]Meter=ShapeHidden=0X=(#StrokeW#+#LineGap#)Y=(#StrokeW#+#LineGap#)Shape=Rectangle (-#StrokeW#/2),(-#StrokeW#/2),(#StrokeW#+#LineW#),(#StrokeW#+#LineH#),#Corner# | StrokeWidth #StrokeW# | Stroke Color 255,255,255,128 | Fill Color #HighlightColor#UpdateDivider=-1DynamicVariables=1[Text1]Group=LinesMeter=StringMeterStyle=TextsY=(#StrokeW#+#LineGap#)MeasureName=ElementName1Text=%1LeftMouseUpAction=[!CommandMeasure ElementName1 "FollowPath"][!UpdateMeasure Folder][!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw][Text2]Group=ElementLinesMeter=StringMeterStyle=TextsMeasureName=ElementName2Text=%1LeftMouseUpAction=[!CommandMeasure ElementName2 "FollowPath"][!UpdateMeasure Folder][!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw][Text3]Group=ElementLinesMeter=StringMeterStyle=TextsMeasureName=ElementName3Text=%1LeftMouseUpAction=[!CommandMeasure ElementName3 "FollowPath"][!UpdateMeasure Folder][!UpdateMeasureGroup Elements][!UpdateMeter *][!Redraw]
Shape Highlight.jpg
It really doesn't matter if it's FileView or other types of measures that provide data, the principle is the same: change the position of the shape or its meter. The rest is up to you and how you integrate the idea in your skin.

Statistics: Posted by Yincognito — Today, 11:39 am



Viewing all articles
Browse latest Browse all 1538

Trending Articles