Compare commits
No commits in common. "383b43b39bb050cfcec22e6a9ba6651198d78e03" and "d16ad868cbdfc6ef5b5c355a8d09c10b3940d57e" have entirely different histories.
383b43b39b
...
d16ad868cb
|
|
@ -598,40 +598,18 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi {
|
||||||
// 进度显示
|
// 进度显示
|
||||||
class Yosin_Schedule extends Yosin_CommonUi {
|
class Yosin_Schedule extends Yosin_CommonUi {
|
||||||
|
|
||||||
//背景
|
|
||||||
BgSprite = null;
|
|
||||||
//条
|
|
||||||
BarSprite = null;
|
|
||||||
|
|
||||||
// schedule 进度比例0-1
|
|
||||||
constructor(X, Y, W, H, path, idx) {
|
constructor(X, Y, W, H, path, idx) {
|
||||||
base.constructor(X, Y, W, H);
|
base.constructor(X, Y, W, H);
|
||||||
|
|
||||||
BgSprite = CL_SpriteObject(path, idx + 1);
|
local schedule = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 164);
|
||||||
Addchild(BgSprite);
|
schedule.SetPosition(0, 0);
|
||||||
|
|
||||||
|
AddUIChild(schedule);
|
||||||
|
|
||||||
|
local scheduleBar = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 165);
|
||||||
|
scheduleBar.SetPosition(1, 1);
|
||||||
|
AddUIChild(scheduleBar);
|
||||||
|
|
||||||
BarSprite = CL_SpriteObject(path, idx);
|
|
||||||
Addchild(BarSprite);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetPercentage(Rate) {
|
|
||||||
local barSize = BarSprite.GetSize();
|
|
||||||
local barW = barSize.w * Rate;
|
|
||||||
|
|
||||||
BarSprite.SetCropRect(BarSprite.X, BarSprite.Y, barW, barSize.h);
|
|
||||||
BarSprite.SetSize(barW, barSize.h);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
@ -81,16 +81,13 @@ l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\InputBox.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Drag_Button.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Drag_Button.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Scroll_Bar.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Scroll_Bar.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Text_Button.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Text_Button.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Top_Title.nut
|
|
||||||
|
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\0_Login.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\0_Login.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\1_Select_Character.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\1_Select_Character.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\2_create_Character.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\2_create_Character.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\3_Top_tool.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\3_Top_tool.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\4_PersonalInfo.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\4_PersonalInfo.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\Inventory_EquipmentPage.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory.nut
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\ItemCollect.nut
|
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\5_Inventory.nut
|
|
||||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\233_HUD_Message.nut
|
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\233_HUD_Message.nut
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,23 +13,21 @@ function TestStage() {
|
||||||
// local Window = Sq_CreateWindow(_Login_Window, "登录界面窗口", 0, 0, 1066, 600, 0);
|
// local Window = Sq_CreateWindow(_Login_Window, "登录界面窗口", 0, 0, 1066, 600, 0);
|
||||||
|
|
||||||
|
|
||||||
|
local Equ = GameItem.Equipment(27675);
|
||||||
|
local Window = Equ.GetEquipmentInfoWindow();
|
||||||
|
Window.SetPosition(100, 80);
|
||||||
|
Window.ResetFocus();
|
||||||
|
|
||||||
// local Equ = GameItem.Equipment(27675);
|
local Equ = GameItem.Equipment(101020048);
|
||||||
// local Window = Equ.GetEquipmentInfoWindow();
|
local Window = Equ.GetEquipmentInfoWindow();
|
||||||
// Window.SetPosition(100, 80);
|
Window.SetPosition(350, 80);
|
||||||
// Window.ResetFocus();
|
Window.ResetFocus();
|
||||||
|
|
||||||
// local Equ = GameItem.Equipment(101020048);
|
local Equ = GameItem.Equipment(24144);
|
||||||
// local Window = Equ.GetEquipmentInfoWindow();
|
local Window = Equ.GetEquipmentInfoWindow();
|
||||||
// Window.SetPosition(350, 80);
|
Window.SetPosition(580, 80);
|
||||||
// Window.ResetFocus();
|
Window.ResetFocus();
|
||||||
|
|
||||||
// local Equ = GameItem.Equipment(24144);
|
|
||||||
// local Window = Equ.GetEquipmentInfoWindow();
|
|
||||||
// Window.SetPosition(580, 80);
|
|
||||||
// Window.ResetFocus();
|
|
||||||
|
|
||||||
local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20);
|
|
||||||
|
|
||||||
// local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20);
|
// local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20);
|
||||||
// //大背景
|
// //大背景
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
文件名:5_Inventory.nut
|
||||||
|
路径:User/UI/Window/5_Inventory.nut
|
||||||
|
创建日期:2025-01-02 12:37
|
||||||
|
文件用途: 背包窗口
|
||||||
|
*/
|
||||||
|
|
||||||
|
class _Inventory extends Yosin_Window {
|
||||||
|
|
||||||
|
item = null;
|
||||||
|
dressUpTitleBtn = null;
|
||||||
|
petTitleBtn = null;
|
||||||
|
stoneTitleBtn = null;
|
||||||
|
|
||||||
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||||
|
base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||||
|
|
||||||
|
local title = Yosin_TopTitle(gWidth, gHeight, "装备栏(I)");
|
||||||
|
AddUIChild(title);
|
||||||
|
|
||||||
|
local item2 = Yosin_EmeStretch(100, 100, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160);
|
||||||
|
Addchild(item2);
|
||||||
|
|
||||||
|
//注册控件
|
||||||
|
RegisterWidget();
|
||||||
|
}
|
||||||
|
|
||||||
|
function RegisterWidget() {
|
||||||
|
|
||||||
|
//, "装扮", "宠物", "护石"
|
||||||
|
local titlesBtn = Yosin_RowMoreTitleBtn(10, 25, ["物品栏"]);
|
||||||
|
AddUIChild(titlesBtn);
|
||||||
|
|
||||||
|
titlesBtn.LBDownOnClick = function(btns, index) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
local item = Yosin_SplicingButton(10, 50, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160, true, false);
|
||||||
|
AddUIChild(item);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//逻辑入口
|
||||||
|
function Proc(Dt) {
|
||||||
|
SyncPos(X, Y);
|
||||||
|
base.Proc(Dt);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
文件名:Inventory_EquipmentPage.nut
|
文件名:Inventory_EquipmentPage.nut
|
||||||
路径:User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut
|
路径:User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut
|
||||||
|
|
@ -123,13 +124,8 @@ class InventoryItem extends Yosin_CommonUi {
|
||||||
});
|
});
|
||||||
weight.SetPosition(itemCollection.X + 8, itemCollection.bottom() - 25);
|
weight.SetPosition(itemCollection.X + 8, itemCollection.bottom() - 25);
|
||||||
Addchild(weight);
|
Addchild(weight);
|
||||||
|
|
||||||
// 重量进度条
|
|
||||||
local weightSchedule = Yosin_Schedule(weight.right() + 2, weight.Y + 4, 125, 10, "sprite/interface/newstyle/windows/inventory/inventory.img", 1);
|
|
||||||
weightSchedule.SetPercentage(0.6);
|
|
||||||
Addchild(weightSchedule);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue