随机主菜单背景

客户端模组,可从自定义窗口组中随机选择主菜单背景和标志。需要在 `XUi_Menu/xui.xml` 中添加指定命名的窗口组,并在 `XUi_Menu/windows.xml` 中定义窗口。必须关闭 EAC。若其他模组依赖它,但你想恢复默认背景,可安全移除此模组。

0浏览
0下载点击
0点赞
0收藏

关于这个 Mod

这是一个客户端模组。若其他模组依赖它来随机更换背景,但你更喜欢默认背景,可以安全移除此模组,不会因此破坏其他内容。

要启用随机背景,需在 XUi_Menu/xui.xml 中添加窗口组:背景窗口组名称使用 menuBackground 加自定义标识,标志窗口组名称使用 mainMenuLogo 加自定义标识。模组会从这些自定义窗口组中随机选择;若没有自定义窗口组,则加载不带自定义标识的默认窗口组。

例如,在 XUi_Menu/xui.xml 中添加以下窗口组:

<test name="XUi_Menu/xui.xml">

   <append xpath="/xui/ruleset[@name='default']">

      <window_group name="menuBackgroundTest1" actionSet="false">

         <window name="backgroundTest1" />

      </window_group>

      <window_group name="menuBackgroundTest2" actionSet="false">

         <window name="backgroundTest2" />

      </window_group>

   </append>

</test>

然后在 XUi_Menu/windows.xml 中像原版背景和标志一样添加对应窗口:

<test name="XUi_Menu/windows.xml">

   <append xpath="/windows">

      <window name="backgroundTest1" anchor="CenterCenter" pos="0,0" width="1050" height="780" depth="-3">

         <texture depth="1" color="[white]" texture="@modfolder:Textures/test1.png" name="bgTexture" anchor_left="#cam,0,-5" anchor_bottom="#cam,0,-5" anchor_right="#cam,1,5" anchor_top="#cam,1,5" />

      </window>

      <window name="backgroundTest2" anchor="CenterCenter" pos="0,0" width="1050" height="780" depth="-3">

         <texture depth="1" color="[white]" texture="@modfolder(SMXlib)://Textures/smxmenu_window_background.png" name="bgTexture" anchor_left="#cam,0,-5" anchor_bottom="#cam,0,-5" anchor_right="#cam,1,5" anchor_top="#cam,1,5" />

      </window>

   </append>

</test>

必须关闭 EAC。

来源与文件

文件说明

rewrite old code

前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。

<!-- aoe-mods-source:nexusmods:7daystodie:2120 -->