no message

This commit is contained in:
Lenheart 2025-01-07 20:52:28 +08:00
parent e391abfa37
commit 383b43b39b
7 changed files with 89 additions and 121 deletions

View File

@ -598,22 +598,40 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi {
// 进度显示
class Yosin_Schedule extends Yosin_CommonUi {
//背景
BgSprite = null;
//条
BarSprite = null;
// schedule 进度比例0-1
constructor(X, Y, W, H, path, idx, schedulePercent) {
constructor(X, Y, W, H, path, idx) {
base.constructor(X, Y, W, H);
local schedule = CL_SpriteObject(path, idx + 1);
Addchild(schedule);
local scheduleBar = CL_SpriteObject(path, idx);
Addchild(scheduleBar);
local barSize = scheduleBar.GetSize();
local barW = barSize.w * schedulePercent;
scheduleBar.SetCropRect(X, Y, barW, 5);
scheduleBar.SetSize( barW , 5);
BgSprite = CL_SpriteObject(path, idx + 1);
Addchild(BgSprite);
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();
}

View File

@ -81,13 +81,16 @@ 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\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\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\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\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\5_Inventory.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\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

View File

@ -13,21 +13,23 @@ function TestStage() {
// 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(101020048);
local Window = Equ.GetEquipmentInfoWindow();
Window.SetPosition(350, 80);
Window.ResetFocus();
// local Equ = GameItem.Equipment(27675);
// local Window = Equ.GetEquipmentInfoWindow();
// Window.SetPosition(100, 80);
// Window.ResetFocus();
local Equ = GameItem.Equipment(24144);
local Window = Equ.GetEquipmentInfoWindow();
Window.SetPosition(580, 80);
Window.ResetFocus();
// local Equ = GameItem.Equipment(101020048);
// local Window = Equ.GetEquipmentInfoWindow();
// Window.SetPosition(350, 80);
// 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);
// //大背景

View File

@ -1,53 +0,0 @@
/*
文件名: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);
}
}

View File

@ -1,4 +1,3 @@
/*
文件名:Inventory_EquipmentPage.nut
路径:User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut
@ -126,12 +125,11 @@ class InventoryItem extends Yosin_CommonUi {
Addchild(weight);
// 重量进度条
local weightSchedule = Yosin_Schedule(weight.right() + 2, weight.Y + 4 , 125, 10, "sprite/interface/newstyle/windows/inventory/inventory.img", 1, 0.7);
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);
}
}