随机主菜单背景

随机主菜单背景

允许你指定多个主菜单背景和标志,然后从所有指定项中随机加载一个。

实用工具

这是一个仅限客户端的模组。如果其他模组需要它来随机化背景,但你更喜欢默认背景,你可以安全地移除这个模组而不会破坏任何内容。

概述已经很好地总结了本模组的使用方法,所以我在这里简单介绍一下如何使用它。

要使此模组生效,您需要为背景添加名为"menuBackground + 自定义标识符"的窗口组,为徽标添加"mainMenuLogo + 自定义标识符"到XUi_Menu/xui.xml中。然后我会从这些自定义窗口组中随机选择一个。如果没有自定义选项,则会加载不带自定义标识符的默认选项。

例如:

XUi_Menu/xui.xml 文件中,我们有以下窗口组:

<config 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>
</config>

然后在 XUi_Menu/windows.xml 中,我们只需像原版背景和标志那样添加这些窗口:

<config name="XUi_Menu/windows.xml">
<append xpath="/windows">
<window name="backgroundTest1" anchor="center center" 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="center center" 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>
</config>

EAC 必须关闭。