It is currently November 14th, 2019, 7:54 am

New Container option

General topics related to Rainmeter.
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

raiguard » December 3rd, 2018, 4:41 am

EDIT EDIT: Oops, meant to add this on to the previous reply instead of making a new one. Oh well. :( Please kindly delete this reply if you're OCD enough to want a clean conversation chain.
raiguard wrote:
December 3rd, 2018, 4:37 am
Neither do I, which is why I put off making my skins scalable until literally every third person was asking me for it. It's just an enormous headache and makes everything 10x more difficult.
EDIT:
jsmorley wrote:
December 3rd, 2018, 4:35 am
I would note that I imagine you could use TransformationMatrix on the "visible" background, it's only the "container" meter that must be simultaneously made larger with W and H, and that isn't "drawn" anyway.
I actually did try this with my first test skin, and although it did work for fixing the background height, I still ran into issues with the line graph positioning (since the line graph still had to use TransformationMatrix)...
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

raiguard » December 22nd, 2018, 3:56 am

Well in the meantime, until Containers are able to play slightly nicer with TransformationMatrix, I decided to go and add another copy of the line graph background, just with the border, so the rounded corners will be respected without needing to use a container.

I hope a solution can be found because I would really like to use containers in ModernGadgets, but it just doesn't play nice with the way I handle scaling...
2018-12-21 20_53_09-.png
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

raiguard » January 19th, 2019, 4:47 am

Code: Select all

[Rainmeter]
MiddleMouseUpAction=[!Refresh]
OnRefreshAction=[!CommandMeasure MeasureActionTimer "Execute 1"][!CommandMeasure MeasureActionTimer "Execute 2"][!CommandMeasure MeasureActionTimer "Execute 3"]
AccurateText=1

[Variables]
; Text settings
text1=This is a long text testy
text2=This is an even loooooooooonger text testy
text3=Too short testy!
; Marquee settings
animationSpeed=32
marqueeBeginWait=1500
marqueeEndWait=1500
; Dynamic variables - do not change
marquee1=0
marquee2=0
marquee3=0

[StyleText]
FontFace=Calibri
FontColor=230,230,230
FontSize=15
FontWeight=600
X=0
Y=1R
Antialias=1
Container=MeterTextContainer
DynamicVariables=1

[MeasureMarquee1Offset]
Measure=Calc
Formula=max(0,([MeterText1:W] - [MeterTextContainer:W]))
DynamicVariables=1

[MeasureMarquee2Offset]
Measure=Calc
Formula=max(0,([MeterText2:W] - [MeterTextContainer:W]))
DynamicVariables=1

[MeasureMarquee3Offset]
Measure=Calc
Formula=max(0,([MeterText3:W] - [MeterTextContainer:W]))
DynamicVariables=1

[MeasureActionTimer]
Measure=Plugin
Plugin=ActionTimer
; Marquee 1
ActionList1=Repeat Move1,#animationSpeed#,[MeasureMarquee1Offset:] | Wait #marqueeEndWait# | Reset1 | Wait #marqueeBeginWait# | DoOver1
Reset1=[!SetVariable marquee1 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText1][!Redraw]
Move1=[!SetVariable marquee1 "(#marquee1# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText1][!Redraw]
DoOver1=[!CommandMeasure MeasureActionTimer "Execute 1"]
; Marquee 2
ActionList2=Repeat Move2,#animationSpeed#,[MeasureMarquee2Offset:] | Wait #marqueeEndWait# | Reset2 | Wait #marqueeBeginWait# | DoOver2
Reset2=[!SetVariable marquee2 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText2][!Redraw]
Move2=[!SetVariable marquee2 "(#marquee2# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText2][!Redraw]
DoOver2=[!CommandMeasure MeasureActionTimer "Execute 2"]
; Marquee 3
ActionList3=Repeat Move3,#animationSpeed#,[MeasureMarquee3Offset:] | Wait #marqueeEndWait# | Reset3 | Wait #marqueeBeginWait# | DoOver3
Reset3=[!SetVariable marquee3 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText3][!Redraw]
Move3=[!SetVariable marquee3 "(#marquee3# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText3][!Redraw]
DoOver3=[!CommandMeasure MeasureActionTimer "Execute 3"]
DynamicVariables=1

[MeterBackground]
Meter=Shape
Shape=Rectangle 1,1,180,106,6 | StrokeWidth 2 | Stroke Color 50,50,50 | Fill Color 15,15,15

[MeterTextContainer]
Meter=Image
SolidColor=255,255,255,255
X=16
Y=16
W=150
H=76

[MeterText1]
Meter=String
MeterStyle=StyleText
X=#marquee1#
Y=1
Text=#text1#

[MeterText2]
Meter=String
MeterStyle=StyleText
X=#marquee2#
Text=#text2#

[MeterText3]
Meter=String
MeterStyle=StyleText
X=#marquee3#
Text=#text3#
simplemarquee.gif
A simple, dynamic text marquee method. It will automatically marquee any length of text, with adjustable animation rate, start and end wait intervals, and text contents. It will automatically not marquee if the text is narrower than the container it is placed in.

The next version will act like a more proper marquee, duplicating the text to create a seamless transition to the next marquee.

EDIT: Updated code to fix dumb mistake...
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017