查看: 21499|回复: 50

[游戏皮肤] FM2009皮肤的动态换背景实现(无需刷新皮肤)(更新文件,直接支持原版风格皮肤)

[复制链接]
发表于 2008-12-3 20:50 | 显示全部楼层 |阅读模式
Linclude原创,首发于PlayCM

---------------------
2008.12.04
应要求,上传了我自己修改的menubar.xml,下载后覆盖到panels文件夹下面。
不过仅限于原版风格的皮肤(就是菜单在中间的这种,比如dDs09, Flex09等)

有两个补丁。
如果已经有global panels.xml,则只需要下载menubar即可。
如果两个都有,还是用下面的方法吧,否则可能会影响皮肤的其他功能。




---------------------
发现cjmtl发的几个新皮肤增加了动态换背景的功能。
如图:


选择后会直接更换背景,即时的。
虽然不是自动,不过已经非常方便了。
我去研究了一下文件,顺便做了一些简化。
简化后的效果如下,直接下拉选择就比较方便了。


使用方法:
【背景放置】
backgrounds下面,一张名为default的,对应默认。
其余5张分别命名为1、2、3、4、5。例如1.jpg,2.png等。图象格式无所谓,似乎都认。

【代码修改】
打开PANELS/menubar.xml,找到下面的部分:
        <widget class="header_popup" text="Options[COMMENT: top menu title]" appearance="menu/options" size="9" font="fonts/trebuc" colour="white" style="light_bold, outlined" outline_colour="outline" alignment="centre">
          <record id="items" file="menus/game"/>
        </widget>
把下面这一段拷贝到上面这段话的下面。之后请重新载入皮肤(强制刷新)(记着先放好图片!
(如果菜单上面的名字想自己命名,请自行修改下面的WP_01, WP_02等为自己喜欢的名字。

  <widget class="header_popup" text="WPs" appearance="menu/options" size="9" font="fonts/trebuc" colour="white" style="light_bold, outlined" outline_colour="outline" alignment="centre">
           <list id="items">
  
    <record id="sbg0">
     <string id="text" value="Default" />
     <flags id="event_id" value="bgs0"/>
     <flags id="event_target" value="bgs0"/>
     </record>
     
     <record id="sbg1">
     <string id="text" value="WP_01" />
     <flags id="event_id" value="bgs1"/>
     <flags id="event_target" value="bgs1"/>
     </record>
     
     <record id="sbg2">
     <string id="text" value="WP_02" />
     <flags id="event_id" value="bgs2"/>
     <flags id="event_target" value="bgs2"/>
     </record>
     
     <record id="sbg3">
     <string id="text" value="WP_03" />
     <flags id="event_id" value="bgs3"/>
     <flags id="event_target" value="bgs3"/>
     </record>
     
     <record id="sbg4">
     <string id="text" value="WP_04" />
     <flags id="event_id" value="bgs4"/>
     <flags id="event_target" value="bgs4"/>
     </record>
     
     <record id="sbg5">
     <string id="text" value="WP_05" />
     <flags id="event_id" value="bgs5"/>
     <flags id="event_target" value="bgs5"/>
     </record>
    </list>
   

        <attachment class="event_relay_attachment" event_id="bgs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd1"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd2"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd3"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd4"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ******* -->
   
   <attachment class="event_relay_attachment" event_id="bgs1">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="bgd1"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd2"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd3"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd4"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ******* -->
   
   <attachment class="event_relay_attachment" event_id="bgs2">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="bgd2"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd3"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd4"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ******* -->
   
   <attachment class="event_relay_attachment" event_id="bgs3">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="bgd3"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs3">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd4"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs3">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ******* -->
   
   <attachment class="event_relay_attachment" event_id="bgs4">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="bgd4"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="bgs4">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ******* -->
   
   <attachment class="event_relay_attachment" event_id="bgs5">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="bgd5"/>
    </record>
   </attachment>
   
   <!-- ****END OF DEFINITIONS*** -->
   
   <attachment class="event_relay_attachment" event_id="mbs0">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="mbdf"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbbs"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbrd"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs0">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbyr"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbdf"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs1">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="mbbs"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbyr"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs1">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbrd"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbdf"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbbs"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs2">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="mbyr"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs2">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbrd"/>
    </record>
   </attachment>
   
    <attachment class="event_relay_attachment" event_id="mbs3">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbdf"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs3">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbbs"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs3">
      <record id="action_event">
     <flags id="event_id" value="hide"/>
     <flags id="event_target" value="mbyr"/>
    </record>
   </attachment>
   
   <attachment class="event_relay_attachment" event_id="mbs3">
      <record id="action_event">
     <flags id="event_id" value="show"/>
     <flags id="event_target" value="mbrd"/>
    </record>
   </attachment>
        </widget>

【说明】
关于换背景,比如原来的的2.jpg换成新的。经过我测试,需要重新强制刷新皮肤才能实现。
也就是1-5这5个文件是被保存在缓存中,而不是和default一样每次载入。

因此不建议机器配置较低的人使用。

[ 本帖最后由 Linclude 于 2008-12-5 13:43 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x

评分

参与人数 3经验 +30 PGB +30 收起 理由
不好玩 + 10 + 10 精品文章
tauruszhou + 10 + 10 感谢分享
cjmtl + 10 + 10 技术达人.....

查看全部评分

发表于 2008-12-3 21:04 | 显示全部楼层
期待楼主的原创主题......
 楼主| 发表于 2008-12-3 21:06 | 显示全部楼层
原帖由 winkle_phone 于 2008-12-3 21:01 发表
对了,俺就是配置低的~~~~~以前CM是还可以酱紫干,当时还和收集头像一样收集各俱乐部背景,记得刚转FM时还说咋不能换背景图了,后来一跑起来就把这个问题永远的封在记忆深处~~~~~~~残念
加5个背景,总大小也在1M以下。
这点内存还是有的吧?:L

早知道我把那句提醒去了算了。
 楼主| 发表于 2008-12-3 21:11 | 显示全部楼层
原帖由 winkle_phone 于 2008-12-3 21:08 发表
只有5个,还得手动换,这差距可就大了去了~~~~~

现在也可以每个俱乐部用不同的背景吧。


不过我希望有的那种每个月换一张这种功能不知道什么时候才有。
发表于 2008-12-3 21:34 | 显示全部楼层
很好...支持了.....弄自己好看的直接给我下载吧...:lol
发表于 2008-12-3 21:57 | 显示全部楼层
了解了解  还是默认的好。
头像被屏蔽
发表于 2008-12-3 22:02 | 显示全部楼层
顶一个......不过一般不用这个~~~
发表于 2008-12-3 22:45 | 显示全部楼层
还是怀念CM时代的自由随机变化背景的模式呀。
发表于 2008-12-4 16:15 | 显示全部楼层
我的皮肤里面没有楼主所说的这个XML文件是怎么回事?
发表于 2008-12-4 16:24 | 显示全部楼层
我的皮肤里面没有楼主所说的这个XML文件是怎么回事?
 楼主| 发表于 2008-12-4 16:36 | 显示全部楼层
原帖由 夜无情 于 2008-12-4 16:24 发表
我的皮肤里面没有楼主所说的这个XML文件是怎么回事?
你用的是哪个皮肤啊?

就像楼上说的,如果没有必要修改,就不会有这个文件
而会直接使用父皮肤的文件。

要改的话去FM2009皮肤里面拷一个过来改。再没有就去FM2008皮肤里面拷一个过来。

[ 本帖最后由 Linclude 于 2008-12-4 16:38 编辑 ]
发表于 2008-12-4 16:55 | 显示全部楼层
能不能在其他皮肤里面直接添加这个XML 。。。。。或者把LZ做好的XML文件发上来共享下。。。如果和原版类似风格的话 这些XML是通用的。因为格式和尺寸大小都差不多。。。我就把有些皮肤的team squad.xml拷到另外一个文件的。。。。
 楼主| 发表于 2008-12-4 17:06 | 显示全部楼层
原帖由 winkle_phone 于 2008-12-4 16:55 发表
LZ,打了你给的补丁后战术界面看不到士气啊,看本土球员那个倒是能点,但点了后原来显示是青训还是本土的那栏全是空的~~~~~是不是那个价格补丁有冲突?

我不清楚啊。
那位给我了两个补丁,但我只用了那个person table list.xml(好像是这个名字吧)。其他的我没用。
 楼主| 发表于 2008-12-4 17:11 | 显示全部楼层
原帖由 dingjiany 于 2008-12-4 16:55 发表
能不能在其他皮肤里面直接添加这个XML 。。。。。或者把LZ做好的XML文件发上来共享下。。。如果和原版类似风格的话 这些XML是通用的。因为格式和尺寸大小都差不多。。。我就把有些皮肤的team squad.xml拷到另外一个文 ...

没太多意义吧,很多好看的皮肤都不是原版风格。。。

要的话我可以发一个我用的dDs09的上来,我改好了。
发表于 2008-12-4 17:11 | 显示全部楼层
开高分辨率就可以看到士气了。。。1280*1024  。。。我现在一直用这个 感觉不错。
发表于 2008-12-4 17:12 | 显示全部楼层
xenon

从08开始就一直用这个皮肤
发表于 2008-12-4 17:12 | 显示全部楼层
原帖由 Linclude 于 2008-12-4 17:11 发表

没太多意义吧,很多好看的皮肤都不是原版风格。。。

要的话我可以发一个我用的dDs09的上来,我改好了。


FLEX09是原版风格啊。。。那皮肤不错

TUMME的那个皮肤的TEAM SQUAD.XML我就用在FLEX09里面  没什么问题的
发表于 2008-12-4 17:22 | 显示全部楼层
小倉優子ちゃん、什么时候下水啊?
发表于 2008-12-4 17:23 | 显示全部楼层
原帖由 winkle_phone 于 2008-12-4 17:14 发表
俺宽屏,分辨率不可能不高



宽屏分辨率一定高吗???
 楼主| 发表于 2008-12-4 20:16 | 显示全部楼层
原帖由 winkle_phone 于 2008-12-4 17:35 发表
不高如何宽屏??你问的还真奇怪。

LZ,算了,俺整合了老熊的旧补丁,要说看价格还是老熊的方便,而且士气显示那个也没问题,不过当然还是不能显示过滤和看本土了,但老熊的补丁可在阵容界面看编号,这对俺汉化球 ...
我搞定了。下载吧。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|爆棚小组 PlayGM论坛

GMT+8, 2024-5-3 13:16 , Processed in 0.031577 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表