This commit is contained in:
lenheart 2025-06-11 09:51:28 +08:00
parent ab4bf2cdf1
commit c21a449501
1 changed files with 20 additions and 3 deletions

View File

@ -138,7 +138,6 @@ class AchievementNC_Item {
SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成"); SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成");
SuccessButton.DWidth = -5; SuccessButton.DWidth = -5;
SuccessButton.Width = 50; SuccessButton.Width = 50;
SuccessButton.SetTextOffset(-4, 1);
SuccessButton.OnClick = function() { SuccessButton.OnClick = function() {
Parent.SendPackEx({ Parent.SendPackEx({
op = 20093005, op = 20093005,
@ -165,7 +164,19 @@ class AchievementNC_Item {
function SetInfo(Info) { function SetInfo(Info) {
this.Info = 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() { function Show() {
@ -440,7 +451,8 @@ class AchievementNC extends LenheartNewUI_Windows {
}); });
ItemList.append(Item); ItemList.append(Item);
} }
ItemScrollValue = ((ItemList.len() - 10) / 2 * 71).tointeger(); if (Jso.rawin("scroll_value")) ItemScrollValue = Jso.scroll_value;
// ItemScrollValue = ((ItemList.len() - 10) / 2 * 71).tointeger();
}.bindenv(this)); }.bindenv(this));
@ -463,6 +475,7 @@ class AchievementNC extends LenheartNewUI_Windows {
NeedItemCount2 = obj.reItemNum2, NeedItemCount2 = obj.reItemNum2,
}); });
ItemList.append(Item); ItemList.append(Item);
if (Jso.rawin("scroll_value")) ItemScrollValue = Jso.scroll_value;
} }
}.bindenv(this)); }.bindenv(this));
} }
@ -590,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); 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); Img["widget"].DrawPng(3, X + 229, Y + 90);
releaseClip(); //裁切结束 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); Img["widget"].DrawPng(4, X + 226, Y + 55);