diff --git a/sqr/Core/UI_Class/UI_Widget.nut b/sqr/Core/UI_Class/UI_Widget.nut index e610967..dec28bf 100644 --- a/sqr/Core/UI_Class/UI_Widget.nut +++ b/sqr/Core/UI_Class/UI_Widget.nut @@ -200,12 +200,10 @@ class Yosin_EmeStretch extends Yosin_CommonUi { // 九宫格拉伸 -function Yosin_NineBoxStretch(X, Y, width, height, path, imgId) { - +function Yosin_NineBoxStretch(width, height, path, imgId) { // 创建画布 local Canvas = CL_CanvasObject(); - Canvas.SetPosition(X, Y); // 重设大小并清空 Canvas.ResizeAndClear(width, height); // 开始绘制 diff --git a/sqr/User/Asset/Item/Equipment.nut b/sqr/User/Asset/Item/Equipment.nut index 2fe10ad..e1c345c 100644 --- a/sqr/User/Asset/Item/Equipment.nut +++ b/sqr/User/Asset/Item/Equipment.nut @@ -50,7 +50,7 @@ class GameItem.EquipmentInfo extends Yosin_Window { Init(); - local background = Yosin_NineBoxStretch(0, 0, 211, RealCanvasHeight + 10, "sprite/interface/lenheartwindowcommon.img", 213); + local background = Yosin_NineBoxStretch(211, RealCanvasHeight + 10, "sprite/interface/lenheartwindowcommon.img", 213); background.SetZOrder(-1); Addchild(background); } diff --git a/sqr/User/Stage/TestStage.nut b/sqr/User/Stage/TestStage.nut index 6673542..f51f03c 100644 --- a/sqr/User/Stage/TestStage.nut +++ b/sqr/User/Stage/TestStage.nut @@ -37,7 +37,7 @@ function TestStage() { // ClientCharacter = Charc; - // local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20); + local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 548, 20); // Window.equipmentPage.Item.ItemCollection.SetItemList([{ // ItemId = 27675 diff --git a/sqr/User/UI/Widget/Top_Title.nut b/sqr/User/UI/Widget/Top_Title.nut index 9267560..57f9425 100644 --- a/sqr/User/UI/Widget/Top_Title.nut +++ b/sqr/User/UI/Widget/Top_Title.nut @@ -13,19 +13,27 @@ class Yosin_TopTitle extends Yosin_CommonUi { //内容背景 if (drawBackground) { - local background = Yosin_NineBoxStretch(0, 15, W + 4, H - 15, "sprite/interface/lenheartwindowcommon.img", 97); + local background = Yosin_NineBoxStretch( W, H, "sprite/interface/lenheartwindowcommon.img", 97); + background.SetPosition(0, 0); Addchild(background); } - // 标题背景 - local Background = Yosin_EmeStretch(0, 0, W + 3, 22, "sprite/interface/lenheartwindowcommon.img", 609); - Addchild(Background); + // 绘制标题背景 + local titleX = drawBackground ? 2 : 0; + local titleW = drawBackground ? W - 4 : W; + local titleBackground = Yosin_EmeStretch(titleX, 0, titleW, 20, "sprite/interface/lenheartwindowcommon.img", 609); + titleBackground.SetScale(1, 1.3); + Addchild(titleBackground); - // 标题亮色背景 + // 标题背景光 local BackgroundBright = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 483); - local scaleW = (Background.GetSize().w / BackgroundBright.GetSize().w).tofloat(); + local BackgroundBrightSize = BackgroundBright.GetSize(); + // 计算光的缩放比例 + local scaleW = (W / BackgroundBrightSize.w).tofloat(); + BackgroundBright.SetScale(scaleW, 1); BackgroundBright.SetPosition(0, 1); + Addchild(BackgroundBright); diff --git a/sqr/User/UI/Window/1_Select_Character.nut b/sqr/User/UI/Window/1_Select_Character.nut index 9108a41..b2a0d25 100644 --- a/sqr/User/UI/Window/1_Select_Character.nut +++ b/sqr/User/UI/Window/1_Select_Character.nut @@ -549,7 +549,8 @@ class _Select_Character_Window extends Yosin_Window { ChangeBackground(Info.loginImg); //角色遮罩栏 - CharacterMaskBox = Yosin_NineBoxStretch(-4, 320, 1074, 680, "sprite/interface/lenheartwindowcommon.img", 0); + CharacterMaskBox = Yosin_NineBoxStretch(1074, 680, "sprite/interface/lenheartwindowcommon.img", 0); + CharacterMaskBox.SetPosition(-4, 320); Addchild(CharacterMaskBox); diff --git a/sqr/User/UI/Window/233_HUD_Message.nut b/sqr/User/UI/Window/233_HUD_Message.nut index 8af48f9..6dcacd2 100644 --- a/sqr/User/UI/Window/233_HUD_Message.nut +++ b/sqr/User/UI/Window/233_HUD_Message.nut @@ -72,19 +72,28 @@ class _Yosin_MessageBox extends Yosin_Window { } function RegisterWidget() { + //背景 - local background = Yosin_NineBoxStretch(-1, 15, cacheW + 1, cacheH, "sprite/interface/lenheartwindowcommon.img", 97); + local background = Yosin_NineBoxStretch( cacheW + 1, cacheH, "sprite/interface/lenheartwindowcommon.img", 97); + background.SetPosition(-1, 15); Addchild(background); - local twoBackground = Yosin_NineBoxStretch(4, 20, cacheW - 8, cacheH - 36, "sprite/interface/lenheartwindowcommon.img", 97); + + //文字背景 + local twoBackground = Yosin_NineBoxStretch( cacheW - 8, cacheH - 36, "sprite/interface/lenheartwindowcommon.img", 97); + twoBackground.SetPosition(4, 20); Addchild(twoBackground); // 绘制标题背景 local titleBackground = Yosin_EmeStretch(0, 0, cacheW, 20, "sprite/interface/lenheartwindowcommon.img", 609); + titleBackground.SetScale(1, 1.2); AddUIChild(titleBackground); + // 标题背景光 local BackgroundBright = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 483); - local scaleW = (cacheW / BackgroundBright.GetSize().w).tofloat(); + local BackgroundBrightSize = BackgroundBright.GetSize(); + local scaleW = (cacheW / BackgroundBrightSize.w).tofloat(); BackgroundBright.SetScale(scaleW, 1); + BackgroundBright.SetPosition( 0, 1); Addchild(BackgroundBright); //确认按钮 diff --git a/sqr/User/UI/Window/2_Create_Character.nut b/sqr/User/UI/Window/2_Create_Character.nut index 2238b65..fbfa445 100644 --- a/sqr/User/UI/Window/2_Create_Character.nut +++ b/sqr/User/UI/Window/2_Create_Character.nut @@ -791,11 +791,8 @@ class _create_Character_enterName extends Yosin_Window { base.constructor("输入角色名称", 0, 0, 1066, 600, 0); //背景 - local background = Yosin_NineBoxStretch(-2, 0, 1070, 604, "sprite/interface/lenheartwindowcommon.img", 97); - Addchild(background); - - //背景 - local background = Yosin_NineBoxStretch(413, 228, 240, 140, "sprite/interface/lenheartwindowcommon.img", 97); + local background = Yosin_NineBoxStretch( 240, 140, "sprite/interface/lenheartwindowcommon.img", 97); + background.SetPosition(413, 228); Addchild(background); // 标题文字 diff --git a/sqr/User/UI/Window/4_Personalinfo/4_PersonalInfo.nut b/sqr/User/UI/Window/4_Personalinfo/4_PersonalInfo.nut index b613bbc..b583b7d 100644 --- a/sqr/User/UI/Window/4_Personalinfo/4_PersonalInfo.nut +++ b/sqr/User/UI/Window/4_Personalinfo/4_PersonalInfo.nut @@ -6,8 +6,6 @@ */ // local infoWindow = Sq_CreateWindow(_PersonalInfo, "个人信息窗口", 250, 60, 286, 530, 20); -// todo 图和尺寸比例都需要修改 -// todo Yosin_Window 和 Yosin_CommonUi 会有性能开销需要检查 class _PersonalInfo extends Yosin_Window { diff --git a/sqr/User/UI/Window/4_Personalinfo/Personalinfo_RoleInfoPage.nut b/sqr/User/UI/Window/4_Personalinfo/Personalinfo_RoleInfoPage.nut index 2e7ef27..1a1b77f 100644 --- a/sqr/User/UI/Window/4_Personalinfo/Personalinfo_RoleInfoPage.nut +++ b/sqr/User/UI/Window/4_Personalinfo/Personalinfo_RoleInfoPage.nut @@ -308,41 +308,6 @@ class roleInfoPropertyItem extends CL_CanvasObject { EndDraw(); } - // additionReaction 属性是否有加成 加成为绿色 不加成灰色 - // function Draw(idx, title, numText, additionReaction = true, width = 120) { - - // // 创建画布 - // local Canvas = CL_CanvasObject(); - // // 重设大小并清空 - // Canvas.ResizeAndClear(width, 18); - // // 开始绘制 - // Canvas.BeginDraw(); - - // local titlecolor = additionReaction ? sq_RGBA(160, 132, 75, 255) : sq_RGBA(79, 79, 79, 255); - // local numColor = additionReaction ? sq_RGBA(75, 161, 85, 255) : sq_RGBA(79, 79, 79, 255); - - // local icon = CL_SpriteFrameObject("sprite/interface2/profile/profile_icon.img", idx); - // Canvas.DrawSpriteFrame(icon, 5, 0); - - // // 属性名称 - // local property = FontAssetManager.GenerateNormal(title, true, { - // color = titlecolor - // }); - // Canvas.DrawActor(property, icon.right() + 5, icon.Y); - - // // 属性数值 - // local propertyNum = FontAssetManager.GenerateNormal(numText, true, { - // color = numColor - // }); - // local numX = width - propertyNum.GetSize().w; - // Canvas.DrawActor(property, numX, icon.Y); - - // // 结束绘制 - // Canvas.EndDraw(); - - // return Canvas; - // } - } @@ -381,11 +346,6 @@ class otherButton extends Yosin_CommonUi { } function Proc(DT) { - // if (isLBDown){ - // SyncPos(X, cacheY + 1); - // }else{ - // SyncPos(X, cacheY); - // } if (isLBDown){ icon.SetPosition( iconX , iconY + 1 ); }else{ @@ -448,7 +408,6 @@ class Personalinfo_CharactersEquipment extends CL_CanvasObject { // 顶部光线 local topLight = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 178); DrawSpriteFrame(topLight, Width / 2 - topLight.GetSize().w / 2, 0); - // DrawSpriteFrame(topLight, 0, 0); // todo 角色展示 diff --git a/sqr/User/UI/Window/5_Inventory/5_Inventory.nut b/sqr/User/UI/Window/5_Inventory/5_Inventory.nut index 177d572..58d2b2c 100644 --- a/sqr/User/UI/Window/5_Inventory/5_Inventory.nut +++ b/sqr/User/UI/Window/5_Inventory/5_Inventory.nut @@ -5,7 +5,7 @@ 文件用途: 背包窗口 */ -//local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 262, 555, 20); +// local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 262, 548, 20); class _Inventory extends Yosin_Window { equipmentPage = null; @@ -25,7 +25,7 @@ class _Inventory extends Yosin_Window { Addchild(title); //关闭按钮 - local closeBtn = Yosin_BaseButton(Width - 15, 4, 12, 12, "sprite/interface/lenheartwindowcommon.img", 544); + local closeBtn = Yosin_BaseButton(Width - 20, 4, 12, 12, "sprite/interface/lenheartwindowcommon.img", 544); closeBtn.DownSimulateOffset = false; closeBtn.SetZOrder(1); closeBtn.OnClick = function(btn) { @@ -41,17 +41,24 @@ class _Inventory extends Yosin_Window { AddUIChild(topBtn); //标题按钮 - local titlesBtn = Yosin_RowMoreTitleBtn(5, 22, 252, ["物品栏", "装扮", "宠物", "护石"], "sprite/interface/lenheartwindowcommon.img", 160); + local titlesBtn = Yosin_RowMoreTitleBtn(5, 25, 250, ["物品栏", "装扮", "宠物", "护石"], "sprite/interface/lenheartwindowcommon.img", 160); AddUIChild(titlesBtn); titlesBtn.LBDownOnClick = function(btns, index) { print(index); }; + + + //物品栏 装备页 - equipmentPage = Inventory_EquipmentPage(2, titlesBtn.bottom() + 4, 300, Height - titlesBtn.bottom() - 4); + equipmentPage = Inventory_EquipmentPage(2, titlesBtn.bottom(), 300, 441); AddUIChild(equipmentPage); + // 钱包 + local moneyItem = MoneyItem(7, Height - 55); + AddUIChild(moneyItem); + } @@ -61,4 +68,87 @@ class _Inventory extends Yosin_Window { base.Proc(Dt); } -} \ No newline at end of file +} + + + + +// 金币相关数值 +class MoneyItem extends Yosin_CommonUi { + + constructor(x, y) { + local w = 248; + local h = 49; + base.constructor(x, y, w, h); + + local txtColor = sq_RGBA(130, 105, 61, 255); + + local bg = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 27); + Addchild(bg); + + // 复活币个数 + local ReviveNum = FontAssetManager.GenerateNormal("23434个", true, { + color = txtColor + }); + ReviveNum.SetPosition(120 - ReviveNum.GetSize().w, 2); + Addchild(ReviveNum); + + + // 胜利的证明 + local winNum = FontAssetManager.GenerateNormal("23434个", true, { + color = txtColor + }); + winNum.SetPosition(245 - winNum.GetSize().w, 2); + Addchild(winNum); + + + + // 商城 + local storeBtn = Yosin_BaseButton(1, 25, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 3); + // local storeBtn = Yosin_BaseButton(0, 0, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 3); + //点击事件回调 + // storeBtn.OnClick = function(Button) { + // }.bindenv(this); + AddUIChild(storeBtn); + + + // 点券 + local storeNum = FontAssetManager.GenerateNormal("23434点券", true, { + color = txtColor + }); + storeNum.SetPosition(120 - storeNum.GetSize().w, 27); + Addchild(storeNum); + + // 金币按钮 + local moneyBtn = Yosin_BaseButton(126, storeBtn.Y, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 7); + //点击事件回调 + // moneyBtn.OnClick = function(Button) { + // }.bindenv(this); + AddUIChild(moneyBtn); + + // 金币数量 + local storeNum = FontAssetManager.GenerateNormal("23434金币", true, { + color = txtColor + }); + storeNum.SetPosition(245 - storeNum.GetSize().w, 27); + Addchild(storeNum); + + + + + } + +} + + +// 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/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut b/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut index 2d14ccb..21cd92c 100644 --- a/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut +++ b/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut @@ -8,71 +8,32 @@ // 背包装备页面 class Inventory_EquipmentPage extends Yosin_CommonUi { - Item = null; + // Item = null; + + ItemCollection = null; constructor(x, y, w, h) { base.constructor(x, y, w, h); // 人物装备 - local charactersEquipment = Inventory_CharactersEquipment(5, 0); - AddUIChild(charactersEquipment); + local charactersEquipment = Inventory_CharactersEquipment(); + charactersEquipment.SetPosition(5, 0); + Addchild(charactersEquipment); + + // 添加书本按钮 + AddBookButton(); // 物品栏 - Item = InventoryItem(0, charactersEquipment.bottom(), Width, Height - charactersEquipment.bottom()); - AddUIChild(Item); + AddItem(); } -} - - - -// 上半部分 人物装备穿戴 -class Inventory_CharactersEquipment extends Yosin_CommonUi { - - // 展示其他装备 - showOtherEquipment = null; - // 允许更换装备 - allowChangeEquipment = null; - // 画布 - Canvas = null; - - constructor(x, y) { - local w = 248; - local h = 179; - base.constructor(x, y, w, h); - - showOtherEquipment = true; - allowChangeEquipment = true; - - // 创建画布 - Canvas = CL_CanvasObject(); - // 重设大小并清空 - Canvas.ResizeAndClear(w, h); - // 设置填充画刷 用于绘制边框和线条 - // Canvas.SetFillBrush(sq_RGBA(59, 56, 57, 250)); - // 设置轮廓画刷 用于绘制边框和线条 - // Canvas.SetStrokeBrush(sq_RGBA(59, 56, 57, 250)); - // 开始绘制 - Canvas.BeginDraw(); - - // 绘制背景 - DrawBackground(); - - // 结束绘制 - Canvas.EndDraw(); - // 添加画布 - Addchild(Canvas); - - - AddButton(); - } // 添加按钮 - function AddButton() { + function AddBookButton() { // 称号 - local designation = Yosin_BaseButton(2, Height - 30, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 50); + local designation = Yosin_BaseButton(7, 145, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 50); //点击事件回调 // permutationBtn.OnClick = function(Button) { // }.bindenv(this); @@ -86,77 +47,20 @@ class Inventory_CharactersEquipment extends Yosin_CommonUi { AddUIChild(skin); // 穿戴中的装备 - local wear = Yosin_BaseButton(Width - 29, designation.Y, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 172); + local wear = Yosin_BaseButton(225, designation.Y, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 172); AddUIChild(wear); // 装备特性 local peculiarity = Yosin_BaseButton(wear.X - 21, designation.Y, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 203); AddUIChild(peculiarity); // 未央环境装备 - // local permutationBtn = Yosin_BaseButton(peculiarity.X - 21, designation.Y, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 128); - // AddUIChild(permutationBtn); - - + local permutationBtn = Yosin_BaseButton(peculiarity.X - 21, designation.Y, 18, 20 "sprite/interface/newstyle/windows/inventory/inventory.img", 128); + AddUIChild(permutationBtn); } - - // 背景 - function DrawBackground() { - - // 背景图 - local bgimg = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventorybackground.img", 0); - // 画布绘制背景 - Canvas.DrawSpriteFrame(bgimg, 0, 0); - - - // 装备栏背景 - local equipmentBackground = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 21); - Canvas.DrawSpriteFrame(equipmentBackground, 5, 5); - - - // 顶部光线 - local topLight = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 178); - Canvas.DrawSpriteFrame(topLight, Width / 2 - topLight.GetSize().w / 2, 0); - - // todo 角色展示 - - // 结婚戒指槽位 - local ringSlotBg = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory_cn.img", 0); - Canvas.DrawSpriteFrame(ringSlotBg, Width / 2 - ringSlotBg.GetSize().w / 2, 5); - - // 首饰 - if (showOtherEquipment) { - // 辅助装备 - local assist = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 19); - Canvas.DrawSpriteFrame(assist, 179, 69); - - // 耳环 - local earrings = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 122); - Canvas.DrawSpriteFrame(earrings, 179, 102); - - // 魔法石 - local MagicStone = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 20); - Canvas.DrawSpriteFrame(MagicStone, 211, 101); - - } - - } - - -} - - - - - -// 物品栏 -class InventoryItem extends Yosin_CommonUi { - ItemCollection = null; - - constructor(gX, gY, gWidth, gHeight) { - base.constructor(gX, gY, gWidth, gHeight); - + // 添加物品栏 + function AddItem() { //物品分类按钮 - local itemBtns = Yosin_RowMoreTitleBtn(3, 4, 252, ["装备", "消耗品", "材料", "副职业", "任务"], "sprite/interface/lenheartwindowcommon.img", 160); + local itemBtns = Yosin_RowMoreTitleBtn(5, 182, 248, ["装备", "消耗品", "材料", "副职业", "任务"], "sprite/interface/lenheartwindowcommon.img", 160); AddUIChild(itemBtns); itemBtns.LBDownOnClick = function(btns, index) { @@ -164,11 +68,12 @@ class InventoryItem extends Yosin_CommonUi { }; // 物品栏边框 - local itemBg = Yosin_NineBoxStretch(2, itemBtns.bottom(), 253, 245, "sprite/interface/lenheartwindowcommon.img", 97); + local itemBg = Yosin_NineBoxStretch(253, 245, "sprite/interface/lenheartwindowcommon.img", 97); + itemBg.SetPosition(2, itemBtns.bottom()); Addchild(itemBg); // 物品栏 - ItemCollection = _ItemCollection(itemBg.X + 7, itemBg.Y + 7, 7); + ItemCollection = _ItemCollection(itemBg.X + 7, itemBg.Y + 3, 7); AddUIChild(ItemCollection); @@ -196,99 +101,79 @@ class InventoryItem extends Yosin_CommonUi { // 搜索 local saerchBtn = Yosin_BaseButton(setBtn.X - 24, permutationBtn.Y, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 94); AddUIChild(saerchBtn); - - - - - - - // 复活币 - local moneyItem = MoneyItem(5, itemBgBottom + 3, 3); - AddUIChild(moneyItem); - } - function SetItemList(gItemList) { - ItemCollection.SetItemList(gItemList); - } + } -// 金币相关数值 -class MoneyItem extends Yosin_CommonUi { - constructor(x, y, idx) { + +// 上半部分 人物装备穿戴 +class Inventory_CharactersEquipment extends CL_CanvasObject { + + constructor() { local w = 248; - local h = 49; - base.constructor(x, y, w, h); + local h = 179; + base.constructor(); - local txtColor = sq_RGBA(130, 105, 61, 255); + // 创建画布 + CL_CanvasObject(); + // 重设大小并清空 + ResizeAndClear(w, h); + // 开始绘制 + BeginDraw(); - local bg = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 27); - Addchild(bg); + // 绘制背景 + DrawBackground(w); - // 复活币个数 - local ReviveNum = FontAssetManager.GenerateNormal("23434个", true, { - color = txtColor - }); - ReviveNum.SetPosition(120 - ReviveNum.GetSize().w, 2); - Addchild(ReviveNum); + // 结束绘制 + EndDraw(); + } - // 胜利的证明 - local winNum = FontAssetManager.GenerateNormal("23434个", true, { - color = txtColor - }); - winNum.SetPosition(245 - winNum.GetSize().w, 2); - Addchild(winNum); + // 背景 + function DrawBackground(Width) { + + // 背景图 + local bgimg = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventorybackground.img", 0); + // 画布绘制背景 + DrawSpriteFrame(bgimg, 0, 0); + + // 装备栏背景 + local equipmentBackground = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 21); + DrawSpriteFrame(equipmentBackground, 5, 5); + // 顶部光线 + local topLight = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 178); + DrawSpriteFrame(topLight, Width / 2 - topLight.GetSize().w / 2, 0); - // 商城 - local storeBtn = Yosin_BaseButton(1, 25, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 3); - // local storeBtn = Yosin_BaseButton(0, 0, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 3); - //点击事件回调 - // storeBtn.OnClick = function(Button) { - // }.bindenv(this); - AddUIChild(storeBtn); + // todo 角色展示 + + // 结婚戒指槽位 + local ringSlotBg = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory_cn.img", 0); + DrawSpriteFrame(ringSlotBg, Width / 2 - ringSlotBg.GetSize().w / 2, 5); - // 点券 - local storeNum = FontAssetManager.GenerateNormal("23434点券", true, { - color = txtColor - }); - storeNum.SetPosition(120 - storeNum.GetSize().w, 27); - Addchild(storeNum); - - // 金币按钮 - local moneyBtn = Yosin_BaseButton(126, storeBtn.Y, 23, 23 "sprite/interface/newstyle/windows/inventory/inventory.img", 7); - //点击事件回调 - // moneyBtn.OnClick = function(Button) { - // }.bindenv(this); - AddUIChild(moneyBtn); - - // 金币数量 - local storeNum = FontAssetManager.GenerateNormal("23434金币", true, { - color = txtColor - }); - storeNum.SetPosition(245 - storeNum.GetSize().w, 27); - Addchild(storeNum); + // 辅助装备 + local assist = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 19); + DrawSpriteFrame(assist, 179, 69); + // 耳环 + local earrings = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 122); + DrawSpriteFrame(earrings, 179, 102); + // 魔法石 + local MagicStone = CL_SpriteFrameObject("sprite/interface/newstyle/windows/inventory/inventory.img", 20); + DrawSpriteFrame(MagicStone, 211, 101); } + } - - - - - - - - // if (!getroottable().rawin("chongzaiflag")) { // getroottable()["chongzaiflag"] <- true; // } else { diff --git a/sqr/User/UI/Window/5_Inventory/ItemCollect.nut b/sqr/User/UI/Window/5_Inventory/ItemCollect.nut index 1b86785..aab35ac 100644 --- a/sqr/User/UI/Window/5_Inventory/ItemCollect.nut +++ b/sqr/User/UI/Window/5_Inventory/ItemCollect.nut @@ -262,14 +262,14 @@ class _ItemCollection extends Yosin_CommonUi { } -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 +// 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