parent
d16ad868cb
commit
e391abfa37
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue