2023-11-05 03:26:09 +08:00
|
|
|
import { v3 } from "cc";
|
|
|
|
import { JNLayerAnim, JNLayerInfo } from "../../../extensions/ngame/assets/ngame/ui/JNLayer";
|
2023-10-23 18:56:01 +08:00
|
|
|
|
|
|
|
export enum GLayer{
|
|
|
|
View = "View",
|
2023-11-08 02:32:54 +08:00
|
|
|
Popup = "Popup",
|
|
|
|
Tips = "Tips",
|
2023-10-23 18:56:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum GUI{
|
2023-11-08 02:32:54 +08:00
|
|
|
/** 系统UI */
|
|
|
|
Login = "Login", //登录页面
|
|
|
|
Loading = "Loading", //加载页面
|
|
|
|
Tips = "Tips", //提示
|
|
|
|
|
|
|
|
Home = "Home", //主页面
|
2023-10-23 18:56:01 +08:00
|
|
|
}
|
|
|
|
|
2023-11-08 02:32:54 +08:00
|
|
|
|
|
|
|
//系统UI
|
|
|
|
const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
|
|
|
|
[GUI.Tips]:{
|
|
|
|
layer:GLayer.Tips,
|
|
|
|
uri: "prefab/ui/System/Tips/TipsView",
|
|
|
|
anims:{
|
|
|
|
front:JNLayerAnim.BackOutOpen,
|
|
|
|
back:JNLayerAnim.BackInClose
|
|
|
|
}
|
|
|
|
},
|
|
|
|
[GUI.Login]:{
|
|
|
|
layer:GLayer.Popup,
|
|
|
|
uri: "prefab/ui/System/LoginView",
|
|
|
|
anims:{
|
|
|
|
front:JNLayerAnim.BackOutOpen,
|
|
|
|
back:JNLayerAnim.BackInClose
|
|
|
|
}
|
|
|
|
},
|
|
|
|
[GUI.Loading]:{
|
2023-11-05 03:26:09 +08:00
|
|
|
layer:GLayer.View,
|
|
|
|
uri: "prefab/ui/Loading/LoadingView",
|
|
|
|
anims:{
|
|
|
|
back:JNLayerAnim.Smaller,
|
|
|
|
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
|
|
|
},
|
|
|
|
},
|
2023-11-08 02:32:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const UIConfig:{ [key: string]: JNLayerInfo; } = {
|
|
|
|
[GUI.Home]:{
|
2023-11-05 03:26:09 +08:00
|
|
|
layer:GLayer.View,
|
|
|
|
uri: "prefab/ui/Home/HomeView",
|
|
|
|
anims:{
|
|
|
|
front:JNLayerAnim.Enlarge,
|
|
|
|
back:JNLayerAnim.Smaller,
|
|
|
|
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
|
|
|
|
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
|
|
|
},
|
|
|
|
},
|
2023-11-08 02:32:54 +08:00
|
|
|
...UISystemConfig
|
2023-10-23 18:56:01 +08:00
|
|
|
}
|
|
|
|
|