diff --git a/sqr/User/UI/Window/5_Inventory/Inventory_DressUpPage.nut b/sqr/User/UI/Window/5_Inventory/Inventory_DressUpPage.nut new file mode 100644 index 0000000..757faf1 --- /dev/null +++ b/sqr/User/UI/Window/5_Inventory/Inventory_DressUpPage.nut @@ -0,0 +1,95 @@ +/* +文件名:Inventory_DressUpPage.nut +路径:User/UI/Window/5_Inventory/Inventory_DressUpPage.nut +创建日期:2025-01-11 15:06 +文件用途:背包装扮页面 +*/ + +// 背包装扮页面 +class Inventory_DressUpPage extends Yosin_CommonUi { + + constructor(x, y, w, h) { + base.constructor(x, y, w, h); + + DrawWidget(); + } + + function DrawWidget() { + + // 人物装扮穿戴 + local CharactersDressUp = Inventory_CharactersDressUp(); + CharactersDressUp.SetPosition(0, 0); + Addchild(CharactersDressUp); + + } + + // 添加按钮 + function AddBtn() { + local ibtn = Yosin_BaseButton(); + } + + +} + + +// 上半部分 人物装扮穿戴 +class Inventory_CharactersDressUp extends CL_CanvasObject { + + constructor() { + local w = 254; + local h = 178; + base.constructor(); + + // 创建画布 + CL_CanvasObject(); + // 重设大小并清空 + ResizeAndClear(w, h); + // 开始绘制 + BeginDraw(); + + // 绘制背景 + DrawBackground(); + + // 结束绘制 + EndDraw(); + } + + + // 背景 + function DrawBackground() { + + // 背景边框 + local bg = Yosin_NineBoxStretch(254, 178, "sprite/interface/lenheartwindowcommon.img", 97); + DrawSprite(bg, 0, 0); + + // 装备装扮背景 + local itemBg = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 11); + DrawSpriteFrame(itemBg, 116, 31); + + // 魔法阵 + local MagicLight = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 179); + DrawSpriteFrame(MagicLight, 5,55); + + // 人物打光 + local CharacterLight = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 178); + DrawSpriteFrame(CharacterLight, -10, 4); + + + } + + +} + + + +if (!getroottable().rawin("chongzaiflag")) { + getroottable()["chongzaiflag"] <- true; +} else { + //遍历窗口队列 如果可见则调用Show + for (local i = 0; i< _SYS_WINDOW_LIST_.len(); i++) { + local Window = _SYS_WINDOW_LIST_[i]; + Window.Visible = false; + Window.RemoveSelf(); + } + TestStage(); +} \ No newline at end of file diff --git a/sqr/folder-alias.json b/sqr/folder-alias.json index 8d7ef1e..cb84e2b 100644 --- a/sqr/folder-alias.json +++ b/sqr/folder-alias.json @@ -283,5 +283,8 @@ }, "User/UI/Window/4_Personalinfo/Personalinfo_RoleInfoPage.nut": { "description": "个人信息页" + }, + "User/UI/Window/5_Inventory/Inventory_DressUpPage.nut": { + "description": "背包装扮页" } } \ No newline at end of file