资源描述
=====================================================
kmplayer皮肤制作修改心得
2009年02月24日 星期二 21:15
kmplayer的外观文件(ksf格式)实际上是个压缩包,只要将其后缀名改成rar或者zip格式就可以打开了。
如果懂得那些语言的话就可以自己做皮肤了
最后压缩的时候要注意: 将文件全部选中(不是直接压缩ksf这个文件夹,而是把这个文件夹下的所有文件全部选中),然后右击选择“添加到压缩文件……”,选择zip格式,然后再把后缀改成ksf即可。
补充:本人经实验发现,其实可以不用把打开后的ksf文件再压缩回去也能用,只要将这个文件夹放入skins文件夹中再右击kmp,从这里可以找到放入skins中的那个文件夹了,选择它也可以打开这个皮肤的。。。。。
这款皮肤不错吧,哈哈(这里可以下载哦:
下面我们就来看看一网友做的一个简单的皮肤吧。。。。
它是由下面这几个图片组成的:(点击放大看)
其代码如下:(为便于学习,本人将其简化了)
[LeftPanel] --左边面板标签
type=panel ---指定其类型为面板
align=left ---对齐方式为左对齐
width=8 ---宽为8像素(px)
image=Left.bmp ---指定目标图片
[RightPanel] ---右边面板标签
type=panel
align=right
width=10
image=Right.bmp
[TopPanel] ---顶部面板标签
type=panel
Transparent=1 ------面板透明度设定(1为透明,0为不透明)
align=Top
height=8
image=CAPTION.BMP
margin1=10 ------边缘设定,可以理解为top边框的右边界向外伸长10px(使边缘融合)
margin2=10 ----边缘设定,可以理解为top边框的左边界向外伸长10px(使边缘融合,这里看效果)
[BottomPanel] ----底部面板标签
type=panel
align=Bottom
height=48
usingtransrgn=1 ---去除黑边(本人理解为类似抠像,1表示“是”,0为“否”)(点这里看效果)
image=Bottom.bmp
margin1=145
margin2=125
[TV] ---TV按钮标签
type=button ---类型为按钮
parent=bottompanel ----按钮需要附着在面板上,指定其父面板为 [BottomPanel]
image=TV.bmp
width=18
height=17
left=-85 -----负号表示离右边85px,正值表示离左边距离85px
top=28 ------离top面板顶部28px
command=openURLcmd ------这是一个命令语句,表示它可以打开TV的url
[PlayList] -----播放列表标签
type=button ------类型为按钮
left=-100
top=28
width=18
height=17
parent=BottomPanel ----指定父面板为[BottomPanel]
Transparent=1 ------面板透明度设定(1为透明,0为不透明)
image=list.bmp
Command=PlaylistViewCmd ---- 表示它可以打开播放列表
hint=播放列表 ------个人理解,它应该是一个说明语句
[Track] --------轨道(时间轨道和声音轨道)标签
type=Slider --------类型为滑动器
parent=BottomPanel ----指定父面板为[BottomPanel]
Thumb=V_Bar_Knob.bmp -----指定滑块
Slider1=SLIDER_MAIN.BMP ----滑块经过前的样式
Slider2=SLIDER_MAIN_RANGE.BMP----滑块经过后的样式
left=100
width= -94 -----此处以右边为参考点(固定的边),离右边为94px(窗口缩放不影响按钮位置)
top=5
margin1=7 -----轨道左边向外扩展7px
margin2=7 -----轨道右边向外扩展7px(这里看效果)
Command=SliderTrack -----命令其为滑动器轨道
[VolumeSlider] --------声音轨道标签
type=Slider
parent=BottomPanel
Thumb=V_Bar_Knob.bmp -----指定滑块
Slider1=SLIDER_MAIN.BMP
Slider2=SLIDER_MAIN_RANGE.BMP
left=-75
width=-10 ---此处以右边为参考点(固定的边),离右边为10px(这样有利于窗口缩放,固定了按钮位置)
height=10
top=12
margin1=13
margin2=13
Command=SliderVolume -----命令其为声音轨道
[TitleLabel] -----显示字幕 标签
type=Label -----类型为标签
parent=BottomPanel
Alignment=left -----调整对齐方式为居左
left=138
width=-112 -----此处以右边为参考点,离右边为112px(这样有利于窗口缩放)
top=28
height=14
FontColor=$FFff00 -----设置字体颜色
FontSize=8 ----设置字体大小
Visibleoutline=1 ------设置字体阴影(1为有,0为无)
Command=LabelTitle -----命令其为显示字幕标签
Scroll=1 -----设置其为滚动字幕样式,(1为字幕可滚动,0为字幕不可滚动)
[Speaker] ------ 声音标签
type=Button ------类型为按钮
parent=BottomPanel
Transparentment=1 ------面板透明度设定(1为透明,0为不透明)
image=speaker.bmp
group=1------是否成组(1为是,点击后图标不反弹,0为否,点击后图标返回到原来的状态)这里看效果
width=11
height=8
left=-88
top=13
Command=AudioMuteVolumeCmd----设置命令为静音
hint=静音
[Play] ------播放标签
type=button
left=5
top=14
width=28
height=28
parent=BottomPanel
image=Play.bmp
Command=PlayPlayPauseCmd ---- 播放命令
hint=播放 -----中文说明
[Pause] ----暂停标签
type=button
left=5
width=28
top=14
height=28
parent=BottomPanel
image=Pause.bmp
Command=PlayPausePlayCmd-----暂停命令
hint=暂停 -----中文说明
[next] -----下一曲标签
type=Button
parent=BottomPanel
image=Next.bmp
width=27
height=19
left=95
top=25
Command=PlayNextFileCmd -----下一曲命令
hint=下一个 -----中文说明
[Prev] ------上一曲标签
type=Button
parent=BottomPanel
image=Prev.bmp
width=27
height=18
left=65
top=26
Command=PlayPrevFileCmd------上一曲标签
hint=上一个 -----中文说明
[stop] ------停止标签
type=Button
parent=BottomPanel
image=stop.bmp
width=21
height=22
left=34
top=22
Command=PlayStopCmd ------停止命令
hint=停止 -----中文说明
[Min] ------最小化标签
type=button
left=-55
top=27
width=16
height=16
parent=bottomPanel
image=mini.bmp
Command=MinCmd ------最小化命令
hint=最小化 -----中文说明
[Zoom] ------最大化标签
type=button
left=-38
top=27
width=16
height=16
parent=bottomPanel
image=restore.bmp
Command=ScreenMaxSize ------最大化命令
hint=全屏幕 -----中文说明
[Restore]
type=button
left=-38
top=27
width=16
height=16
parent=bottomPanel
image=restore.bmp
Command=ScreenRestoreSize-----还原窗口命令
hint=回到视窗方式
[Exit] ------退出标签
type=button
left=-21
top=27
width=16
height=16
parent=bottomPanel
image=exit.bmp
Command=ExitCmd ------退出命令
hint=关闭
说明:
在设置高宽时要注意选择参考边,因为我们要考虑播放器的缩放问题,我们应该选择固定边作参考,比如,[track]轨道标签,left=100,width=-94这里track左边离父面板左边的距离为100px,而右边则离父面板的右边距离为94,这样, 不管播放器如何缩放,track轨道都是固定在一个位置的,即不管面板如何缩放,track轨道两端离父面板两端的距离都是不变的,避免了track因面板的缩放而发生们位移。。。。。。
此为本人经半天时间自己摸索出来的一点点小小的经验,肯定是漏洞百出,希望懂得制作kmp皮肤的朋友多提意见,多多指教
(另外,这是KMP的升级版本——POTplayer)
=====================================================
=====================================================
=====================================================
=====================================================
展开阅读全文