It is currently May 18th, 2024, 5:22 am

custom image as progressbar knob?

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

custom image as progressbar knob?

Post by apit23 »

hi, is it possible possible to use an image as knob ?. Or we can only use solid color.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: custom image as progressbar knob?

Post by Mordasius »

Yes it is possible. You can use a knob image in a rotator meter and make it turn with different values from a [measure]. Or you can have a series of clickable transparent images covering different parts of the underlying knob image.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: custom image as progressbar knob?

Post by apit23 »

how about just simple progress bar for music player?
and hows the sample coding look like?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: custom image as progressbar knob?

Post by Mordasius »

This uses Poiru's NowPlaying plugin and will show a progress bar for your music player using the image myBar.png.

Code: Select all

[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=TITLE
PlayerPath=
DisableLeadingZero=1

[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=PROGRESS

[MtProgressBar]
Meter=Bar
MeasureName=mProgress
BarImage=#@#Images\myBar.png
BarOrientation=HORIZONTAL
AntiAlias=1
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: custom image as progressbar knob?

Post by apit23 »

owh, but is it the head (front) of the imagebar is cut?
as instance, i have a progressbar with the rounded head, but is it will be cut?

i'm sorry if i'm wrong.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: custom image as progressbar knob?

Post by Mordasius »

You probably need to make the rounded end of your progress bar as a separate image and show that before adding the rectangular progress bar. It does mean you'll always start with 'half-moon' rounded bit but I can't think of any other way to avoid cutting off part of the 'half-moon' at the beginning.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: custom image as progressbar knob?

Post by apit23 »

is it same as SolidColor knob ?
X=(54+(87 *([mProgress] / 100)))

but can it use with image? :???:
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: custom image as progressbar knob?

Post by Mordasius »

apit23 wrote:is it same as SolidColor knob ?
X=(54+(87 *([mProgress] / 100)))
but can it use with image? :???:
Yes I think it is. You just need to make a small knob image like that below and then use X= to move it along with the progress bar as in your example.
Knob.png
You do not have the required permissions to view the files attached to this post.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: custom image as progressbar knob?

Post by apit23 »

Yes, it works :D . But when i used it with lua script such as fade.lua, it seems like the y= of [knob] cannot be move?
hmmm. maybe only just me facing it. :???:

But. Thanks for your help.Helps a lot. :)