Jump to content

[教程] 水莲教你设置个体V和个体0背景高亮


Recommended Posts

前言

初次见面和好久不见,我是水莲,由于不少人找我问个体V高亮怎么做,本来摸鱼已久的我决定出来修一下自己的主题并且把这个个体V高亮的代码出个教程,想必其他主题大佬也已经拆过包学会了,但因为问的人不少我还是出一个吧。

下面是教程,有啥找我的请直接与我联系,有可能不看回帖。

 

首先先呈上我自己的主题包


提取码:adju 


下面教程将以我自己的主题包举例

1.既然做高亮背景,那么得有背景图,经过我多次测试,长12525的横条图片是最适合的,这个图片可以新建一个文件,也可以直接画在原有的图片上,我的主题包是加在了monster-info.png里面

 monster-info.png.f2777871ae4360cfe75284efe0099cc6.png

2.有了图,就需要给图片划区,在gfx.xml中创建需要用的选取部分,因为我用的是monster-info.png。所以代码是
<images file="res/monster-info.png" filter="nearest">

<area name="mi-label-value31" xywh="386,57,125,25" />
 <area name="mi-label-value0" xywh="386,82,125,25" />

</images>

其中xywh="386,57,125,25"的含义,386是所在图片中的X坐标,57是所在的Y坐标,这两个数值决定里初始点在哪。然后125是长,25是宽,决定了从初始点向右选取多少,向下选取多少。

 

3. 在精灵面板文件monster-frame.xml里面进行设置

找到原代码

<theme name="label-monster-value-stat-complete" ref="label" allowWildcard="true">

<theme name="label-monster-value-stat-bad" ref="label" allowWildcard="true">

这两个代码是定位客户端内的,后缀complete的是个体31和后缀bad的是个体0

给这两个代码下方分别对应追加上设置好的图片

<param name="background"><image>mi-label-value31</image></param>

<param name="background"><image>mi-label-value0</image></param>

 

效果图

 

1.png.b22b6d4185ac5674c24c5cc659d7964b.png

欢迎转载教程,也欢迎在我的主题包上进行修改发布你们自己的主题。如果可以注明转载出处和修改出处是我就最好不过了。

 

Edited by OzSorcerer
Link to comment
  • Clara changed the title to [教程] 水莲教你设置个体V和个体0背景高亮
  • 4 weeks later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.