diff --git a/sqr/Core/UI_Class/UI_Widget.nut b/sqr/Core/UI_Class/UI_Widget.nut index e84862d..b97ddf3 100644 --- a/sqr/Core/UI_Class/UI_Widget.nut +++ b/sqr/Core/UI_Class/UI_Widget.nut @@ -598,17 +598,21 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi { // 进度显示 class Yosin_Schedule extends Yosin_CommonUi { - constructor(X, Y, W, H, path, idx) { + // schedule 进度比例0-1 + constructor(X, Y, W, H, path, idx, schedulePercent) { base.constructor(X, Y, W, H); - local schedule = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 164); - schedule.SetPosition(0, 0); + local schedule = CL_SpriteObject(path, idx + 1); + Addchild(schedule); - AddUIChild(schedule); + local scheduleBar = CL_SpriteObject(path, idx); + Addchild(scheduleBar); - local scheduleBar = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 165); - scheduleBar.SetPosition(1, 1); - AddUIChild(scheduleBar); + local barSize = scheduleBar.GetSize(); + local barW = barSize.w * schedulePercent; + + scheduleBar.SetCropRect(X, Y, barW, 5); + scheduleBar.SetSize( barW , 5); } diff --git a/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut b/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut index 24b164e..aa3460b 100644 --- a/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut +++ b/sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut @@ -124,6 +124,12 @@ class InventoryItem extends Yosin_CommonUi { }); weight.SetPosition(itemCollection.X + 8, itemCollection.bottom() - 25); Addchild(weight); + + // 重量进度条 + local weightSchedule = Yosin_Schedule(weight.right() + 2, weight.Y + 4 , 125, 10, "sprite/interface/newstyle/windows/inventory/inventory.img", 1, 0.7); + Addchild(weightSchedule); + + } }