It is currently April 28th, 2024, 9:15 am

add knob or marker at progress bar.

Get help with creating, editing & fixing problems with skins
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

add knob or marker at progress bar.

Post by apit23 »

hi i have a problem with adding a marker at end of progress bar.Please help me to sort it.
it always started from the left and end at the middle as in the pic.

here the pic and the ini
[Bar]
Meter=Bar
MeasureName=mProgress
BarImage=Fill.png
X=55
Y=84
W=91
H=7
-Hidden=1
Group=Music
BarOrientation=HORIZONTAL
DynamicVariables=1

[Knob]
-Meter=Image
SolidColor=75a534
W=4
H=3
X=(91 *([mProgress] / 100))
Y=86
Hidden=0
-Group=Music
BarOrientation=HORIZONTAL
DynamicVariables=1[
1.JPG
2.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: add knob or marker at progress bar.

Post by Mordasius »

If the [Bar] meter is working as you expect it to (and that is not clear from the screenshots) then you probably just need to get rid of a few of the typos in [Knob]

Code: Select all

[Knob]
Meter=Image
SolidColor=75a534
W=4
H=3
X=(91 *([mProgress] / 100))
Y=86
Hidden=0
Group=Music
;BarOrientation=HORIZONTAL
DynamicVariables=1
Last edited by Mordasius on August 17th, 2012, 11:08 am, edited 1 time in total.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: add knob or marker at progress bar.

Post by apit23 »

hmm.. the problem is the knob/marker starts outside from the place/bar.see the pics.sorry if not clear.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: add knob or marker at progress bar.

Post by Mordasius »

apit23 wrote:hmm.. the problem is the knob/marker starts outside from the place/bar.see the pics.sorry if not clear.
Sorry, but it is still not clear to me. Could you put an arrow or some other marker on the pics to show where the problem lies. To me Pic 1 has no bar and no knob while Pic 2 has a bar at 100% and no knob.

EDIT: sorry now I see it. Try this as the [Knob] meter

Code: Select all

[Knob]
Meter=Image
SolidColor=75a534
W=4
H=3
X=(55+(87 *([mProgress] / 100)))
Y=86
Group=Music
DynamicVariables=1
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: add knob or marker at progress bar.

Post by apit23 »

kudos. thanx. working like a charm. but can you explain how exactly you do it?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: add knob or marker at progress bar.

Post by Mordasius »

apit23 wrote:..can you explain how exactly you do it?
The problem was that you had X=55 in your [Bar] Meter which tells Rainmeter to start the bar at 55 pixels from the left of the meter. You then had X=(91 *([mProgress] / 100)) in your [Knob] Meter which was telling Rainmeter to start showing the Knob at 0 + (91 *([mProgress] / 100)) pixels. So when progess was = 0 the Knob was being shown at X=0 or 55 pixels to the left of where it needed to be to be aligned with the bar.

So what I did was add 55 pixels to the start position of your [Knob] meter ( (X=(55+(87 *([mProgress] / 100))) ). Note I used 87 rather than 91 to allow for the fact that your knob had W=4 which meant it would be 4 pixels wide. If that causes any problems with your graphics then you can adjust it accordingly.

Hope that makes some sort of sense.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: add knob or marker at progress bar.

Post by apit23 »

Great!!

i 've another problem. but i don't want to open a new topic.can please help me about this.
first, the panel work fine by showing music ( the panel hide prev, next, bar, cover. )
but when i press the prev or next button it also hide the panel.
how to make it doesn't kinda mix up.
and sorry if not clear again. :\

heres my ini and some pics
[Plus]
Meter=IMAGE
ImageName=anim0.png
X=0
Y=70
AntiAlias=1
ToolTipText=Show Music
LeftMouseDownAction=!Execute [!HideMeter Plus][!ShowMeterGroup Music][!ShowMeterGroup Control][!ShowMeter PlusHidden][!Redraw]

[PlusHidden]
Meter=IMAGE
ImageName=Panel.png
X=-1r
Y=r
AntiAlias=1
Hidden=1
ToolTipText=Hide Music
LeftMouseDownAction=!Execute [!HideMeter PlusHidden][!HideMeterGroup Music][!HideMeterGroup Control][!ShowMeter Plus][!Redraw]



------------------------------------------
[Next]
Meter=Image
ImageName=next.png
X=182
Y=78
W=16
H=22
Hidden=1
Group=Control
ToolTipText=Next
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Next"][!ShowMeterGroup Control][!Redraw]


[Previous]
Meter=Image
ImageName=prev.png
X=-178r
Y=r
Hidden=1
Group=Control
ToolTipText=Previous
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Previous"][!ShowMeterGroup Control][!Redraw]
1.JPG
2.JPG
SOLVED.The problem is images need to be cropped.
You do not have the required permissions to view the files attached to this post.