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

Help: Rainmeter Skins • Re: Help making Marquee constantly rotate song title

$
0
0
Currently when the song title is too long it bounces. Id like it to permanently rotate if too long for the window. Ive tryed myself but im a big old noob. Thanks.
Try this (untested, from the top of my head):

Code:

[Variables]...FirstSlideDone=0......[MeasureTitle]...OnChangeAction=[!SetVariable marquee1 0][!SetVariable FirstSlideDone 0][!UpdateMeter MeterDetails][!Redraw][!UpdateMeasure MeasureMarquee1Offset][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]DynamicVariables=1...[MeasureDuration]...OnChangeAction=[!SetVariable marquee1 0][!SetVariable FirstSlideDone 0][!UpdateMeter MeterDetails][!Redraw][!UpdateMeasure MeasureMarquee1Offset][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]DynamicVariables=1......[MeasureMarquee1Offset]...Formula=(([MeterDetails:W]<=[MeterDetailContainer:W])?(0):([MeterDetails:W]+[MeterDetailContainer:W]*#FirstSlideDone#))...[MeasureActionTimer]...ActionList1=Repeat Move1,#animationSpeed#,[MeasureMarquee1Offset:] | Wait #marqueeEndWait# | Reset1 | Wait #marqueeBeginWait# | DoOver1Reset1=[!SetVariable marquee1 (([MeterDetails:W]<=[MeterDetailContainer:W])?(0):([MeterDetailContainer:W]))][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterDetails][!Redraw]Move1=[!SetVariable marquee1 (#marquee1#-1)][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterDetails][!Redraw]DoOver1=[!SetVariable FirstSlideDone 1][!UpdateMeasure MeasureMarquee1Offset][!UpdateMeasure MeasureActionTimer][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]......
I adjusted the [MeasureMarquee1Offset] value to [MeterDetails:W] for the 1st slide of a track and to [MeterDetails:W]+[MeterDetailContainer:W] for subsequent slides of a track via the 0 or 1 dynamic value of the FirstSlideDone variable, given that each track starts with marquee1 equal to 0 (left edge of the container) and not equal to [MeterDetailContainer:W] (right edge of the container). Besides that, I added a few updates and redraws here and there, to hopefully avoid temporary glitches when changing tracks or the value of various variables and measures.

Generally, if marquee1 started from [MeterDetailContainer:W] (right edge of the container) for each track, making [MeasureMarquee1Offset] equal to [MeterDetails:W] (text length in pixels) for the 1st slide of a track wouldn't have been necessary, and it would have stayed equal to [MeterDetails:W]+[MeterDetailContainer:W] (slide from the right edge of the container until the right edge of the text disappears at the left edge of the container).

Previously, the text was sliding only by the greater or equal to 0 difference between the length of the text and the length of the container in pixels, that's why it bounced. Let us know if the above works for you the way you wanted.

EDIT: Found the time to test, replaced the plain [!SetVariable marquee1 [MeterDetailContainer:W]] with the conditional [!SetVariable marquee1 (([MeterDetails:W]<=[MeterDetailContainer:W])?(0):([MeterDetailContainer:W]))] in Reset1 from [MeasureActionTimer], to avoid placing the text outside the container when the length of the text is less than the length of the container in pixels (in that case, the text shouldn't slide at all since [MeasureMarquee1Offset] is 0 based on the same principle).
Test sample reduced to the essentials (using Winamp and NowPlaying, in my case):

Code:

[Rainmeter]Update=100AccurateText=1MiddleMouseUpAction=[!Refresh]OnRefreshAction=[!CommandMeasure MeasureActionTimer "Execute 1"][Variables];User Settings, these are for you :DSpotiGreen=29,185,84YoutubeRed=255,0,0SoundCloudOrange=242,111,35AlbumArtSize=40TextClipWidth=200TextClipHeight=20TextFontSize=10DetailsFontColor=255,255,255SongDetailPositionX=48SongDetailPositionY=8ProgressBarPositionX=48ProgressBarPositionY=33ProgressBarWidth=310ProgressBarThickness=5FirstButtonPosition=58ButtonSpacing=5RButtonHeight=6HoverVolumeBGOpacity=200VolumeLvFontSize=13VolumeBtnSize=30VolumeBtnPadding=10; Marquee settings, these aren't for you :(animationSpeed=32marqueeBeginWait=1500marqueeEndWait=1500;Dynamic Vars, neither are these :(marquee1=0volopac1=1ProgressBarCol=29,185,84FirstSlideDone=0---Measures---[MeasureArtist]Measure=NowPlayingPlayerName=WinampPlayerType=ArtistDynamicVariables=1[MeasureTitle]Measure=NowPlayingPlayerName=[MeasureArtist]PlayerType=TitleOnChangeAction=[!SetVariable marquee1 0][!SetVariable FirstSlideDone 0][!UpdateMeter MeterDetails][!Redraw][!UpdateMeasure MeasureMarquee1Offset][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]DynamicVariables=1[MeasureDuration]Measure=NowPlayingPlayerName=[MeasureArtist]PlayerType=DurationOnChangeAction=[!SetVariable marquee1 0][!SetVariable FirstSlideDone 0][!UpdateMeter MeterDetails][!Redraw][!UpdateMeasure MeasureMarquee1Offset][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]DynamicVariables=1[MeasureMarquee1Offset]Measure=CalcFormula=(([MeterDetails:W]<=[MeterDetailContainer:W])?(0):([MeterDetails:W]+[MeterDetailContainer:W]*#FirstSlideDone#))DynamicVariables=1[MeasureActionTimer]Measure=PluginPlugin=ActionTimerActionList1=Repeat Move1,#animationSpeed#,[MeasureMarquee1Offset:] | Wait #marqueeEndWait# | Reset1 | Wait #marqueeBeginWait# | DoOver1Reset1=[!SetVariable marquee1 (([MeterDetails:W]<=[MeterDetailContainer:W])?(0):([MeterDetailContainer:W]))][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterDetails][!Redraw]Move1=[!SetVariable marquee1 (#marquee1#-1)][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterDetails][!Redraw]DoOver1=[!SetVariable FirstSlideDone 1][!UpdateMeasure MeasureMarquee1Offset][!UpdateMeasure MeasureActionTimer][!CommandMeasure MeasureActionTimer "Stop 1"][!CommandMeasure MeasureActionTimer "Execute 1"]DynamicVariables=1---Meters---[MeterDetailContainerVisible]Meter=ShapeShape=Rectangle 0,0,#TextClipWidth#,#TextClipHeight# | Fill Color 0,0,0,128Y=#SongDetailPositionY#X=#SongDetailPositionX#[MeterDetailContainer]Meter=ShapeShape=Rectangle 0,0,#TextClipWidth#,#TextClipHeight#Y=#SongDetailPositionY#X=#SongDetailPositionX#[MeterDetails]Meter=StringMeasureName=MeasureArtistMeasureName2=MeasureTitleAntiAlias=1FontColor=#DetailsFontColor#FontFace=Circular Std MediumFontSize=#TextFontSize#Text="%1 | %2"X=#marquee1#Y=0Container=MeterDetailContainerDynamicVariables=1

Statistics: Posted by Yincognito — Today, 12:36 pm



Viewing all articles
Browse latest Browse all 1554

Trending Articles