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

General Discussion • Clamp and Shape % problems.

$
0
0
Having tried several game launcher apps, I've decided it would be easier to make my own with the added benefit of taking up minimal space without the hundreds of thousands of files, the massive task of setting it all up and far more reliable. Retroarch was good, at first, then it just got more and more problematic. LaunchBox is very good, but your just adding all of that fancy interface on top of the standard emulator programs.

Then I thought I'd have a go at making my own...

I've not long started and am stuck as to why the Clamp function isn't working correctly. It allows the setting to go below zero, to -5 and up to 260 despite being clamped from 0-255. What's wrong here that doesn't affect the other skins I use it on? I just don't get it! :confused:

Also, I can never seem to figure out the correct way to get percentage values for the Bars! A few weeks ago, I looked up how to do it, followed the instructions and it still didn't work. That's when I came here and requested help. Again, I am asking for help, because the very same formula that is explained on the site, that should surely work for everything you want to turn to a percentage, but it doesn't! Isn't there a standard way of getting a percentage value no matter what the source?

Code:

Code:

========================================; STYLES========================================[sAllText]FontFace=Trebuchet MSStringStyle=BoldStringAlign=CenterCenterFontSize=10FontColor=#White#AntiAlias=1UpdateDivider=#UDX#========================================; BACKGROUND COLOUR SETTINGS========================================[Background]Meter=ShapeShape=Rectangle 0,0,#ScreenAreaWidth#,#WorkAreaHeight# | Extend FillAShape2=Rectangle 0,0,#ScreenAreaWidth#,#WorkAreaHeight# | Extend FillBShape3=Rectangle 200,40,(#ScreenAreaWidth#-240),(#WorkAreaHeight#-80),20 | StrokeWidth 5 | StrokeColor #OrangeDark#Shape4=Combine Shape2 | XOR Shape3ShapeFillA=Fill Color #BgA#FillB=Fill Color #BgB#DynamicVariables=1[BgSettingsBorder]Meter=ShapeShape=Rectangle 0,0,140,210,5 | Fill Color #BgFill# | StrokeWidth 2 | StrokeColor #OrangeDark#Shape2=Rectangle 10,10,120,90,5 | Fill Color #BgFill# | StrokeWidth 1 | StrokeColor #White60#Shape3=Rectangle 10,110,120,90,5 | Fill Color #BgFill# | StrokeWidth 1 | StrokeColor #White60#UpdateDivider=#UDX#X=40Y=(#WorkAreaHeight#-250)[NameA]Meter=StringMeterStyle=sAllTextText=BackgroundX=([BgSettingsBorder:X]+70)Y=([BgSettingsBorder:Y]+22)[sColBarA]Shape=Rectangle                                 0, 0, #BarW#, -#BarH# | StrokeWidth 1 | Extend StrokeAlpha | Fill Color #Trans#Shape2=Rectangle 0, 0, #BarW#, (([#[#CURRENTSECTION]]*(-#BarH#))/100) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlpha#Shape3=Rectangle   0, ([#[#CURRENTSECTION]]/100*(-#BarH#)), #BarW#, 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]StrokeAlpha=StrokeColor #White60#LeftMouseUpAction=[!WriteKeyValue Variables #CURRENTSECTION# "[#[#CURRENTSECTION]]"]MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #White#"][!UpdateMeter #CURRENTSECTION#][!Redraw]MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #White60#"][!UpdateMeter #CURRENTSECTION#][!Redraw]MouseScrollUpAction=[!SetVariable #CURRENTSECTION# (Clamp([#[#CURRENTSECTION]],0,255))][!SetVariable #CURRENTSECTION# ([#[#CURRENTSECTION]]+5)][!SetVariable BgA "[#RedA],[#GreenA],[#BlueA],[#AlphaA]"][!UpdateMeter "#CURRENTSECTION#"] [!UpdateMeter Background][!Redraw]MouseScrollDownAction=[!SetVariable #CURRENTSECTION# (Clamp([#[#CURRENTSECTION]],0,255))][!SetVariable #CURRENTSECTION# ([#[#CURRENTSECTION]]-5)][!SetVariable BgA "[#RedA],[#GreenA],[#BlueA],[#AlphaA]"][!UpdateMeter "#CURRENTSECTION#"] [!UpdateMeter Background][!Redraw]DynamicVariables=1X=15RY=r; Bg; Bar; Line[RedA]Meter=ShapeMeterStyle=sColBarAX=([NameA:X]-11)Y=([NameA:Y]+73)[GreenA]Meter=ShapeMeterStyle=sColBarA[BlueA]Meter=ShapeMeterStyle=sColBarA[AlphaA]Meter=ShapeMeterStyle=sColBarA
Thanks for your help :thumbup:

Statistics: Posted by sl23 — Today, 12:51 pm



Viewing all articles
Browse latest Browse all 1056

Trending Articles