128 lines
3.5 KiB
TypeScript
Raw Normal View History

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", //提示
2023-11-10 03:56:07 +08:00
/** 新手引导 */
NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
2023-11-15 18:38:00 +08:00
/** 主页页面 */
MainChat = "MainChat", //主页聊天页面
IntoBattleView = "IntoBattleView", //上阵页面
2023-11-08 02:32:54 +08:00
Home = "Home", //主页面
2023-11-13 02:37:29 +08:00
Main = "Main", //主页面2
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,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/系统页面/Tips/TipsView",
2023-11-08 02:32:54 +08:00
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
}
},
[GUI.Login]:{
layer:GLayer.Popup,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/系统页面/LoginView",
2023-11-08 02:32:54 +08:00
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
}
},
[GUI.Loading]:{
2023-11-05 03:26:09 +08:00
layer:GLayer.View,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/加载页面/LoadingView",
2023-11-05 03:26:09 +08:00
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
}
2023-11-14 03:35:48 +08:00
//主页UI
const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.MainChat]:{
layer:GLayer.Tips,
uri: "prefab/ui/主页/聊天/MainChatView",
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(0,-1280,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(0,-1280,0)}
}
},
}
2023-11-10 03:56:07 +08:00
//新手引导页面
const UINoviceConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.NoviceNamingView]:{
layer:GLayer.Popup,
uri: "prefab/ui/新手引导页面/NoviceNamingView",
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
}
},
[GUI.NoviceSelectPetView]:{
layer:GLayer.Popup,
uri: "prefab/ui/新手引导页面/NoviceSelectPetView",
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
}
},
}
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,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/主页/HomeView",
2023-11-05 03:26:09 +08:00
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-13 02:37:29 +08:00
[GUI.Main]:{
layer:GLayer.View,
uri: "prefab/ui/主页/MainView",
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-15 18:38:00 +08:00
[GUI.IntoBattleView]:{
layer:GLayer.View,
uri: "prefab/ui/阵法/IntoBattleView",
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
},
},
2023-11-10 03:56:07 +08:00
...UISystemConfig, //系统页面
...UINoviceConfig, //新手引导页面
2023-11-14 03:35:48 +08:00
...UIMainConfig, //主页面
2023-10-23 18:56:01 +08:00
}