It is currently April 26th, 2024, 8:35 pm

Split-flap display

Get help with creating, editing & fixing problems with skins
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Split-flap display

Post by FreeRaider »

Hello to all. I I would like to create a train schedule board skin like this one in the video
.

Any idea to create the split-flap part?

Thanks in advance.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Split-flap display

Post by balala »

Maybe not exactly the same effect, but what about this:

Code: Select all

[Rainmeter]
Update=-1

[Variables]
U=[!UpdateMeasure "MeasurePos"][!UpdateMeter "MeterBackground2"][!UpdateMeter "MeterString2"][!Redraw]
Y=0

[MeasurePos]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Increase,10,25
Increase=[!SetVariable Y "(#Y#+4.5)"]#U#
DynamicVariables=1

[MeterContainer]
Meter=Shape
Shape=Rectangle 0,0,32,42,5
X=2
Y=2

[MeterBackground1]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,32,42,5 | Extend MyModifiers1
MyModifiers1=Fill Color 91,37,39 | StrokeWidth 2 | Stroke Color 46,115,31
Container=MeterContainer
LeftMouseUpAction=[!CommandMeasure "MeasurePos" "Execute 1"]

[MeterString1]
Meter=STRING
X=16r
Y=21r
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1
Text=1
DynamicVariables=1
Container=MeterContainer

[MeterBackground2]
Meter=Shape
X=0
Y=#Y#
Shape=Rectangle 0,0,32,42,5 | Extend MyModifiers1
MyModifiers1=Fill Color 91,37,39 | StrokeWidth 2 | Stroke Color 46,115,31
Container=MeterContainer
DynamicVariables=1

[MeterString2]
Meter=STRING
X=16r
Y=(#Y#+21)
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1
Text=2
DynamicVariables=1
Container=MeterContainer
GIF.gif
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Split-flap display

Post by eclectic-tech »

I would suggest using Character Reference Variables and some Loop measures to simulated the rotating letters. I only set up 2 loops, but several could be designed to vary the effect.

The one faux paux in this method is you should use a mono-spaced font so the display width does not vary. I used Space Mono from Google.

Code: Select all

[Rainmeter]
Update=25
LeftMouseUpAction=[!Refresh]

[Variables]
Location1=REGIONAL
Location2=PLATFORM2

[mSpinner1]
Measure=Loop
StartValue=48
EndValue=91
Increment=1
DynamicVariables=1
IfCondition=mSpinner1>=91
IfTrueAction=[!PauseMeasure mSpinner1][!SetOption MeterString1 Text #Location1#][!SetOption MeterString2 Text #Location2#]

[mSpinner2]
Measure=Loop
StartValue=48
EndValue=91
Increment=1
DynamicVariables=1
InvertMeasure=1
IfCondition=mSpinner2<=48
IfTrueAction=[!PauseMeasure mSpinner2]

[MeterString1]
Meter=STRING
SolidColor=0,0,0,1
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Space Mono
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text=[\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]]
DynamicVariables=1

[MeterString2]
Meter=STRING
X=4R
Y=r
SolidColor=0,0,0,1
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Space Mono
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text=[\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]][\[&mSpinner2]][\[&mSpinner1]]
DynamicVariables=1
flipboard1.gif
Love your idea for this and can't wait to see if you make any progress! :thumbup:
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Split-flap display

Post by eclectic-tech »

To control what appears in the spinning characters you could create measures for random characters A~Z, numbers 0~9, and special symbols.
I simplified the example by controlling the spinning in a single measure and grouping all the specialized character generator measures.
flipboard2.gif

Code: Select all

[Rainmeter]
Update=33
LeftMouseUpAction=[!Refresh]

[Variables]
Location1=REGIONAL
Location2=PLATFORM:2

; Characters A~Z and spin control
[mSpinnerAZ]
Group=Spinners
Measure=Loop
StartValue=65
EndValue=90
Increment=1
DynamicVariables=1
IfCondition=mSpinnerAZ>=90
IfTrueAction=[!PauseMeasureGroup Spinners][!SetOption MeterString1 Text #Location1#][!SetOption MeterString2 Text #Location2#]

; First random A~Z
[mSpinnerRandAZ1]
Group=Spinners
Measure=Calc
Formula=Random
LowBound=65
HighBound=90
UniqueRandom=1
UpdateRandom=1
DynamicVariables=1

; Second random A~Z
[mSpinnerRandAZ2]
Group=Spinners
Measure=Calc
Formula=Random
LowBound=65
HighBound=90
UniqueRandom=1
UpdateRandom=1
DynamicVariables=1

; Third random A~Z
[mSpinnerRandAZ3]
Group=Spinners
Measure=Calc
Formula=Random
LowBound=65
HighBound=90
UniqueRandom=1
UpdateRandom=1
DynamicVariables=1

; Limit characters to 0~9
[mSpinnerNumbers]
Group=Spinners
Measure=Calc
Formula=Random
LowBound=48
HighBound=57
DynamicVariables=1

; Limit characters to symbols
[mSpinnerSymbols]
Group=Spinners
Measure=Calc
Formula=Random
LowBound=58
HighBound=64
DynamicVariables=1

[MeterString1]
Meter=STRING
SolidColor=0,0,0,1
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Space Mono
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text=[\[&mSpinnerAZ]][\[&mSpinnerRandAZ1]][\[&mSpinnerRandAZ2]][\[&mSpinnerRandAZ3]][\[&mSpinnerRandAZ2]][\[&mSpinnerRandAZ1]][\[&mSpinnerRandAZ2]][\[&mSpinnerRandAZ3]]
DynamicVariables=1

[MeterString2]
Meter=STRING
X=4R
Y=r
SolidColor=0,0,0,1
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=18
FontFace=Space Mono
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text=[\[&mSpinnerAZ]][\[&mSpinnerRandAZ3]][\[&mSpinnerRandAZ2]][\[&mSpinnerAZ]][\[&mSpinnerRandAZ1]][\[&mSpinnerRandAZ3]][\[&mSpinnerRandAZ2]][\[&mSpinnerRandAZ1]][\[&mSpinnerSymbols]][\[&mSpinnerNumbers]]
DynamicVariables=1
Having too much fun with this :lol:
You do not have the required permissions to view the files attached to this post.
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Split-flap display

Post by FreeRaider »

eclectic-tech wrote: May 23rd, 2019, 1:49 pm
eclectic-tech interesting approach. :thumbup:

in general, to recreate the rotation of the flap, I was thinking of using a transformation matrix, but I have to study how it works.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Split-flap display

Post by balala »

FreeRaider wrote: May 23rd, 2019, 7:58 pm in general, to recreate the rotation of the flap, I was thinking of using a transformation matrix, but I have to study how it works.
Using TransformationMatrix to rotate meters isn't a such complicated thing as it seems at a first look. I love this extremely powerful option, so if you have any question, I think I can help you.