This commit is contained in:
lenheart 2025-06-09 00:44:16 +08:00
parent 359ce60192
commit f48fcf33a9
1 changed files with 0 additions and 113 deletions

View File

@ -126,36 +126,20 @@ class AchievementNC_Item {
Info = null; Info = null;
<<<<<<< HEAD
SuccessButton = null; SuccessButton = null;
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
constructor(Window, Idx, Info) { constructor(Window, Idx, Info) {
Parent = Window; Parent = Window;
Img = Window.Img["widget"]; Img = Window.Img["widget"];
this.Idx = Idx; this.Idx = Idx;
this.Info = Info; this.Info = Info;
<<<<<<< HEAD
//完成按钮 //完成按钮
SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成"); SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成");
=======
this.Info = {
Name = "测试的成就名称",
Desc = "0/100",
Exp = sq_getRandom(1, 99).tostring()
};
//完成按钮
local SuccessButton = Achievement_New_ItemButton(42 + 85 + 85, 420, 15, "完成");
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
SuccessButton.DWidth = -5; SuccessButton.DWidth = -5;
SuccessButton.Width = 50; SuccessButton.Width = 50;
SuccessButton.SetTextOffset(-4, 1); SuccessButton.SetTextOffset(-4, 1);
SuccessButton.OnClick = function() { SuccessButton.OnClick = function() {
<<<<<<< HEAD
Parent.SendPackEx({ Parent.SendPackEx({
op = 20093005, op = 20093005,
cjid = Parent.CurrentTypePage, cjid = Parent.CurrentTypePage,
@ -165,18 +149,10 @@ class AchievementNC_Item {
SuccessButton.SetCallBackFunc(function(Button) { SuccessButton.SetCallBackFunc(function(Button) {
Button.X = (X + 174).tointeger(); Button.X = (X + 174).tointeger();
Button.Y = (Y + 30).tointeger(); Button.Y = (Y + 30).tointeger();
=======
}.bindenv(this);
SuccessButton.SetCallBackFunc(function(Button) {
Button.X = (X + 170).tointeger();
Button.Y = (Y + 20).tointeger();
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
Button.CutPosY_Start = Parent.Y + 110; Button.CutPosY_Start = Parent.Y + 110;
Button.CutPosY_End = Parent.Y + 496; Button.CutPosY_End = Parent.Y + 496;
}.bindenv(this)); }.bindenv(this));
Parent.ItemButtonList.append(SuccessButton); Parent.ItemButtonList.append(SuccessButton);
<<<<<<< HEAD
SetInfo(Info ? Info : { SetInfo(Info ? Info : {
Name = "测试的成就名称", Name = "测试的成就名称",
@ -190,8 +166,6 @@ 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< 2) SuccessButton.State = 8;
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
} }
function Show() { function Show() {
@ -208,7 +182,6 @@ class AchievementNC_Item {
L_sq_DrawCode(Info.Desc, X + 60, Y + 30, sq_RGBA(174, 174, 174, 255), 0, 1); L_sq_DrawCode(Info.Desc, X + 60, Y + 30, sq_RGBA(174, 174, 174, 255), 0, 1);
} }
<<<<<<< HEAD
function TopShow() { function TopShow() {
if (IMouse.GetXPos() > X && IMouse.GetXPos()< X + 236 && IMouse.GetYPos() > Y && IMouse.GetYPos()< Y + 66) { if (IMouse.GetXPos() > X && IMouse.GetXPos()< X + 236 && IMouse.GetYPos() > Y && IMouse.GetYPos()< Y + 66) {
L_sq_DrawWindow(X - 8, Y - 4 - 66, 236, 50, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13); L_sq_DrawWindow(X - 8, Y - 4 - 66, 236, 50, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
@ -359,13 +332,6 @@ class AchievementNC_MerchandiseItem {
X = (Parent.X + 235 + (Idx % 2 * 248)).tointeger(); X = (Parent.X + 235 + (Idx % 2 * 248)).tointeger();
Y = (Parent.Y - Parent.ItemScrollRate * Parent.ItemScrollValue + 121 + (Idx / 2 * 72)).tointeger(); Y = (Parent.Y - Parent.ItemScrollRate * Parent.ItemScrollValue + 121 + (Idx / 2 * 72)).tointeger();
} }
=======
function Proc() {
X = Parent.X + 235 + (Idx % 2 * 248);
Y = Parent.Y - Parent.ItemScrollRate * Parent.ItemScrollValue + 121 + (Idx / 2 * 72);
}
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
} }
class AchievementNC extends LenheartNewUI_Windows { class AchievementNC extends LenheartNewUI_Windows {
@ -376,16 +342,10 @@ class AchievementNC extends LenheartNewUI_Windows {
// NoWindow = true; // NoWindow = true;
//是否可见 //是否可见
<<<<<<< HEAD
Visible = false; Visible = false;
//脚本数据 //脚本数据
ScriptInfo = null; ScriptInfo = null;
=======
// Visible = false;
EtcInfo = null;
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
//图像对象 //图像对象
Img = null; Img = null;
@ -412,7 +372,6 @@ class AchievementNC extends LenheartNewUI_Windows {
ItemScrollBar = null; ItemScrollBar = null;
//项目滚轮值 //项目滚轮值
ItemScrollRate = 0; ItemScrollRate = 0;
<<<<<<< HEAD
ItemScrollValue = 400; ItemScrollValue = 400;
//查询成就状态 //查询成就状态
@ -428,9 +387,6 @@ class AchievementNC extends LenheartNewUI_Windows {
op = 20093021 op = 20093021
}); });
} }
=======
ItemScrollValue = 100;
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = []; Childrens = [];
@ -438,7 +394,6 @@ class AchievementNC extends LenheartNewUI_Windows {
ItemButtonList = []; ItemButtonList = [];
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
<<<<<<< HEAD
//给一个等级的默认值 //给一个等级的默认值
Level = { Level = {
lv = 1, lv = 1,
@ -448,23 +403,12 @@ class AchievementNC extends LenheartNewUI_Windows {
//读取pvf数据 //读取pvf数据
InitScriptData(); InitScriptData();
=======
//TODO
Level = {
lv = 15,
exp = 100,
maxexp = 200
}
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
//构造Img //构造Img
InitImg(); InitImg();
//构造类型按钮 //构造类型按钮
InitTypeButton(); InitTypeButton();
//构造商店按钮 //构造商店按钮
InitShopButton(); InitShopButton();
<<<<<<< HEAD
//构造组件按钮 //构造组件按钮
InitWidgetButton(); InitWidgetButton();
//构造项目 //构造项目
@ -544,10 +488,6 @@ class AchievementNC extends LenheartNewUI_Windows {
} }
} }
}.bindenv(this)); }.bindenv(this));
=======
//构造项目
InitItem();
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
} }
function InitTypeButton() { function InitTypeButton() {
@ -558,7 +498,6 @@ class AchievementNC extends LenheartNewUI_Windows {
Button.Y = Y + 110 + 60 * Button.Pos - (TypeButtonScrollRate * TypeButtonScrollValue).tointeger(); Button.Y = Y + 110 + 60 * Button.Pos - (TypeButtonScrollRate * TypeButtonScrollValue).tointeger();
}.bindenv(this)); }.bindenv(this));
Button.OnClickEx = function(Button) { Button.OnClickEx = function(Button) {
<<<<<<< HEAD
//将其他的选中状态取消选中自己 //将其他的选中状态取消选中自己
foreach(Btn in TypeButton) { foreach(Btn in TypeButton) {
Btn.isSelect = false; Btn.isSelect = false;
@ -570,13 +509,6 @@ class AchievementNC extends LenheartNewUI_Windows {
ItemScrollBar.Reset(); ItemScrollBar.Reset();
//查询 //查询
QueryTheAchievementStatus(); QueryTheAchievementStatus();
=======
foreach(Btn in TypeButton) {
Btn.isSelect = false;
Button.isSelect = true;
}
CurrentTypePage = Button.Pos;
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
}.bindenv(this); }.bindenv(this);
TypeButton.append(Button); TypeButton.append(Button);
} }
@ -589,7 +521,6 @@ class AchievementNC extends LenheartNewUI_Windows {
}.bindenv(this)); }.bindenv(this));
} }
<<<<<<< HEAD
function InitShopButton() { function InitShopButton() {
//商店按钮 //商店按钮
@ -600,13 +531,6 @@ class AchievementNC extends LenheartNewUI_Windows {
Btn.isSelect = false; Btn.isSelect = false;
} }
QueryShopInfo(); QueryShopInfo();
=======
function InitShopButton() {
//关闭按钮
local ShopButton = LenheartNewUI_BaseButton(34, 435, 160, 61, "achievement/shopbutton.img", 0);
ShopButton.OnClick = function() {
CurrentTypePage = -99;
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
}.bindenv(this); }.bindenv(this);
Childrens.append(ShopButton); Childrens.append(ShopButton);
@ -618,7 +542,6 @@ class AchievementNC extends LenheartNewUI_Windows {
}.bindenv(this)); }.bindenv(this));
} }
<<<<<<< HEAD
function InitWidgetButton() { function InitWidgetButton() {
//关闭按钮 //关闭按钮
local CloseButton = LenheartNewUI_BaseButton(734, 0, 11, 12, "interface/lenheartwindowcommon.img", 276); local CloseButton = LenheartNewUI_BaseButton(734, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
@ -628,8 +551,6 @@ class AchievementNC extends LenheartNewUI_Windows {
Childrens.append(CloseButton); Childrens.append(CloseButton);
} }
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
function InitImg() { function InitImg() {
Img = {}; Img = {};
Img["background"] <- Rindro_Image("achievement/background.img"); Img["background"] <- Rindro_Image("achievement/background.img");
@ -657,21 +578,11 @@ class AchievementNC extends LenheartNewUI_Windows {
//绘制常规页面 //绘制常规页面
if (CurrentTypePage != -99) { if (CurrentTypePage != -99) {
<<<<<<< HEAD
//上背景框 //上背景框
Img["widget"].DrawPng(0, X + 220, Y + 45); Img["widget"].DrawPng(0, X + 220, Y + 45);
//经验 //经验
Img["widget"].DrawPng(2, X + 223, Y + 86); Img["widget"].DrawPng(2, X + 223, Y + 86);
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(0, X + 220, Y + 45);
Img["widget"].DrawPng(1, X + 220, Y + 109);
//经验
Img["widget"].DrawPng(2, X + 223, Y + 86);
setClip(X + 223, Y + 86, X + 229 + 463 - (Level.exp.tofloat() / Level.maxexp.tofloat() * 463).tointeger(), Y + 90 + 6);
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
Img["widget"].DrawPng(3, X + 229, Y + 90); Img["widget"].DrawPng(3, X + 229, Y + 90);
releaseClip(); //裁切结束 releaseClip(); //裁切结束
@ -686,20 +597,14 @@ class AchievementNC extends LenheartNewUI_Windows {
DrawNum(format("%02d", Level.lv), X + 274, Y + 63); DrawNum(format("%02d", Level.lv), X + 274, Y + 63);
} }
<<<<<<< HEAD
//下背景框 //下背景框
Img["widget"].DrawPng(1, X + 220, Y + 109); Img["widget"].DrawPng(1, X + 220, Y + 109);
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
} }
<<<<<<< HEAD
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
function Show(obj) { function Show(obj) {
DrawMain(obj); DrawMain(obj);
@ -722,10 +627,7 @@ class AchievementNC extends LenheartNewUI_Windows {
foreach(Item in ItemList) { foreach(Item in ItemList) {
Item.Show(); Item.Show();
} }
<<<<<<< HEAD
//项目的按钮层 //项目的按钮层
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
foreach(Window in ItemButtonList) { foreach(Window in ItemButtonList) {
if (Window.CallBackFunc) Window.CallBackFunc(Window); if (Window.CallBackFunc) Window.CallBackFunc(Window);
if (Window.Visible) { if (Window.Visible) {
@ -734,18 +636,12 @@ class AchievementNC extends LenheartNewUI_Windows {
} }
} }
releaseClip(); //裁切结束 releaseClip(); //裁切结束
<<<<<<< HEAD
//用来显示悬停之类的顶层信息 //用来显示悬停之类的顶层信息
foreach(Item in ItemList) { foreach(Item in ItemList) {
Item.TopShow(); Item.TopShow();
} }
} }
=======
}
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
RegisFlag = false; RegisFlag = false;
//逻辑入口 //逻辑入口
function Proc(obj) { function Proc(obj) {
@ -818,10 +714,6 @@ class AchievementNC extends LenheartNewUI_Windows {
if (Flag) TypeButtonScrollBar.DoStep(-1); if (Flag) TypeButtonScrollBar.DoStep(-1);
if (!Flag) TypeButtonScrollBar.DoStep(1); if (!Flag) TypeButtonScrollBar.DoStep(1);
} }
<<<<<<< HEAD
=======
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
//右侧的滚动条判定 //右侧的滚动条判定
if (MousePos_X > (X + 221) && MousePos_X<(X + 733) && MousePos_Y > (Y + 110) && MousePos_Y<(Y + 496)) { if (MousePos_X > (X + 221) && MousePos_X<(X + 733) && MousePos_Y > (Y + 110) && MousePos_Y<(Y + 496)) {
if (Flag) ItemScrollBar.DoStep(-1); if (Flag) ItemScrollBar.DoStep(-1);
@ -837,17 +729,12 @@ class AchievementNC extends LenheartNewUI_Windows {
} }
function OpenCallBack() { function OpenCallBack() {
<<<<<<< HEAD
Visible = true; Visible = true;
//查询 //查询
QueryTheAchievementStatus(); QueryTheAchievementStatus();
} }
=======
}
>>>>>>> b4e775bd708d4e7dbac90434e14b1df50efcc8ec
} }
L_Windows_List <- []; L_Windows_List <- [];