Jump to content

[教程]手机动态登陆背景


Recommended Posts

Posted
引用

 

以上为电脑版原帖,本帖内容为依据上贴修改后的手机版动态登陆界面

 

折叠

先看效果图:

Screenshot_2024_1125_225034_eu.pokemmo.client-ezgif.com-resize.gif.732d99bff1331e3f5cec5b7e33f5d1fe.gif

 

图片不清晰可以看视频

 

 

教程:

首先我们需要知道,动态登陆页面的实现不是靠gif或视频实现的,而是通过一帧一帧的图片逐帧播放形成的,这也就有了以下步骤:

 

第一步:打开手机的"theme.xml"文件,在<fontGen/>之下加入一行代码:

	<include filename="login-animation.xml"/>

 

第二步:既然在theme中引用了新的文件,自然需要创建一个"login-animation.xml"给他引用,在文件内加入代码:

<?xml version="1.0" encoding="UTF-8"?>
<themes>
    <images file="anim/scene00001.png" filter="nearest">
        <area name="bg-f00001" xywh="*"/>
    </images>
    <images file="anim/scene00002.png" filter="nearest">
        <area name="bg-f00002" xywh="*"/>
    </images>
    ...
  //以此类推...
    <images>
        <animation name="login-background-animation" timeSource="enabled">
            <frame ref="bg-f00001" duration="50"/>
            <frame ref="bg-f00002" duration="50"/>
          ...
        //以此类推...
      </animation>
    </images>

	
	<theme name="logingui" ref="logingui">
		<param name="background"><image>login-background-animation</image></param>
   	</theme>
	<theme name="characterselectgui" ref="characterselectgui">
		<param name="background"><image>login-background-animation</image></param>
   	</theme>
	<theme name="queuegui" ref="queuegui">
		<param name="background"><image>login-background-animation</image></param>
   	</theme>
</themes>

1.这里的图片不局限于png格式,jpg也是可以的

2.duration是图片播放延时,以毫秒为单位

 

第三步:同样的,新文件中引用了一个新的文件夹"anim",这个文件夹就是存放图片的文件夹,我们直接将分解好的图片放入文件夹即可

Screenshot_20241125_233754.thumb.jpg.b2d60d84e3feac0208853f5d3c25e332.jpg

 

特别鸣谢:king

Posted
	<theme name="queuegui" ref="queuegui">
		<param name="background"><image>login-background-animation</image></param>
   	</theme>
</themes>

您好,冒昧的请问一下,为什么结尾这段跟原教程不一致,在是有什么含义或者是新的变动吗,我尝试了原教程的↓↓↓结果是无法只用,用上面的可以。电脑主题

      <images>
        <composed name="login-background-animation">
            <alias ref="animation"/>
            <alias ref="login-background"/>
        </composed>
    </images>
</themes>
Posted
22小时前,Axiaoying2316 说:
	<theme name="queuegui" ref="queuegui">
		<param name="background"><image>login-background-animation</image></param>
   	</theme>
</themes>

您好,冒昧的请问一下,为什么结尾这段跟原教程不一致,在是有什么含义或者是新的变动吗,我尝试了原教程的↓↓↓结果是无法只用,用上面的可以。电脑主题

      <images>
        <composed name="login-background-animation">
            <alias ref="animation"/>
            <alias ref="login-background"/>
        </composed>
    </images>
</themes>

用上面的就可以了,暂时,我还没找到我那个的解决方法

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.