Compare commits

...

2 Commits

Author SHA1 Message Date
lenheart c21a449501 11 2025-06-11 09:51:28 +08:00
lenheart ab4bf2cdf1 修复22最大只有22个项目 2025-06-11 09:36:36 +08:00
1 changed files with 20 additions and 2 deletions

View File

@ -138,7 +138,6 @@ class AchievementNC_Item {
SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成");
SuccessButton.DWidth = -5;
SuccessButton.Width = 50;
SuccessButton.SetTextOffset(-4, 1);
SuccessButton.OnClick = function() {
Parent.SendPackEx({
op = 20093005,
@ -165,7 +164,19 @@ class AchievementNC_Item {
function SetInfo(Info) {
this.Info = Info;
if (this.Info.IsSuccess< 2) SuccessButton.State = 8;
if (this.Info.IsSuccess == 0) {
SuccessButton.State = 8;
SuccessButton.TextStr = "未达成"
SuccessButton.SetTextOffset(-11, 2);
} else if (this.Info.IsSuccess == 1) {
SuccessButton.State = 8;
SuccessButton.TextStr = "已完成"
SuccessButton.SetTextOffset(-11, 2);
SuccessButton.Visible = false;
} else if (this.Info.IsSuccess == 2) {
SuccessButton.TextStr = "完成"
SuccessButton.SetTextOffset(-4, 1);
}
}
function Show() {
@ -440,6 +451,8 @@ class AchievementNC extends LenheartNewUI_Windows {
});
ItemList.append(Item);
}
if (Jso.rawin("scroll_value")) ItemScrollValue = Jso.scroll_value;
// ItemScrollValue = ((ItemList.len() - 10) / 2 * 71).tointeger();
}.bindenv(this));
@ -462,6 +475,7 @@ class AchievementNC extends LenheartNewUI_Windows {
NeedItemCount2 = obj.reItemNum2,
});
ItemList.append(Item);
if (Jso.rawin("scroll_value")) ItemScrollValue = Jso.scroll_value;
}
}.bindenv(this));
}
@ -589,6 +603,10 @@ class AchievementNC extends LenheartNewUI_Windows {
setClip(X + 223, Y + 86, X + 229 + (Level.exp.tofloat() / Level.maxexp.tofloat() * 463).tointeger(), Y + 90 + 6);
Img["widget"].DrawPng(3, X + 229, Y + 90);
releaseClip(); //裁切结束
//绘制经验值
local ExpStr = Level.exp + "/" + Level.maxexp;
L_sq_DrawCode(ExpStr, X - LenheartTextClass.GetStringLength(ExpStr) / 2 + 678, Y + 74, sq_RGBA(230, 200, 155, 255), 0, 1);
//旗帜
Img["widget"].DrawPng(4, X + 226, Y + 55);