It is currently April 10th, 2020, 7:58 pm

New Container option

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

Re: Test of new Container option

Post by raiguard »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

Post by raiguard »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Test of new Container option

Post by raiguard »

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
User avatar
Krainz
Posts: 190
Joined: May 27th, 2012, 5:16 am

Re: New Container option

Post by Krainz »

There is still no way to nest containers?

I'm using a shape meter to limit the draw area of some image meters but I don't want them to show up beyond the skin's intended limits

Will try a workaround with both SkinAreaWidth/SkinAreaHeight and Containers
User avatar
jsmorley
Developer
Posts: 20461
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Container option

Post by jsmorley »

No, you can't nest containers.
User avatar
Yincognito
Posts: 1182
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Test of new Container option

Post by Yincognito »

raiguard wrote:
December 3rd, 2018, 3:51 am
However, I can't do it your way in my suite, because that would involve basically rewriting every skin from scratch (and some of the skins are several thousand lines long!), and that method doesn't work at all with string meters. The reason I went with TransformationMatrix was because I could, for the most part, just add the TransformationMatrix option to the styles in the stylesheet, and they just worked.
So, do you still have a problem with scaling, raiguard? Cause if you do, I might have a solution for you that doesn't involve rewriting every skin from scratch. I had this solution at the time when you posted as well, but I spent less time in this area of the forum and didn't see your posts until now. And yes, it can do string meters as well - actually any type of meter.