174 lines
6.2 KiB
Plaintext
174 lines
6.2 KiB
Plaintext
/*
|
|
文件名:AradPass_Help.nut
|
|
路径:Project/AradPass/AradPass_Help.nut
|
|
创建日期:2024-08-19 21:25
|
|
文件用途:战令助力页面
|
|
*/
|
|
class AradPass_HelpC extends LenheartNewUI_Windows {
|
|
//调试模式
|
|
// DeBugMode = true;
|
|
|
|
//不是窗口
|
|
// NoWindow = true;
|
|
|
|
//是否可见
|
|
// Visible = false;
|
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
|
Childrens = [];
|
|
//注册控件
|
|
RegisterWidget();
|
|
|
|
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
|
}
|
|
|
|
//因为要重载LenheartNewUI_Windows的构造函数
|
|
function ResetFocus() {
|
|
|
|
}
|
|
|
|
function RegisterWidget() {
|
|
// //关闭按钮
|
|
// local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
|
// CloseButton.OnClick = function() {
|
|
// this.Visible = false;
|
|
// }.bindenv(this);
|
|
// Childrens.append(CloseButton);
|
|
|
|
//助力按钮
|
|
local UpButton = LenheartNewUI_ButtonText(160, 266, 15, "发起助力");
|
|
UpButton.SetTextOffset(-7, 1);
|
|
UpButton.OnClick = function() {
|
|
local T = {
|
|
op = 20059011,
|
|
Type = 0
|
|
}
|
|
SendPackEx(T);
|
|
}.bindenv(this);
|
|
UpButton.SetCallBackFunc(function(Win) {
|
|
if (Parent && Parent.BaseInfo && Parent.BaseInfo.help == 1) {
|
|
Win.State = 8;
|
|
} else {
|
|
Win.State = 0;
|
|
}
|
|
}.bindenv(this));
|
|
AddChild(UpButton);
|
|
|
|
//完成按钮
|
|
local SuccessButton = LenheartNewUI_ButtonText(42, 420, 15, "完成");
|
|
SuccessButton.DWidth = -5;
|
|
SuccessButton.Width = 50;
|
|
SuccessButton.SetTextOffset(-4, 1);
|
|
SuccessButton.OnClick = function() {
|
|
local T = {
|
|
op = 20059011,
|
|
Type = 5
|
|
}
|
|
SendPackEx(T);
|
|
}.bindenv(this);
|
|
SuccessButton.SetCallBackFunc(function(Win) {
|
|
if (Parent && Parent.BaseInfo && Parent.BaseInfo.helpNum< 5) {
|
|
Win.State = 8;
|
|
} else {
|
|
Win.State = 0;
|
|
}
|
|
}.bindenv(this));
|
|
AddChild(SuccessButton);
|
|
|
|
//完成按钮
|
|
local SuccessButton1 = LenheartNewUI_ButtonText(42 + 85, 420, 15, "完成");
|
|
SuccessButton1.DWidth = -5;
|
|
SuccessButton1.Width = 50;
|
|
SuccessButton1.SetTextOffset(-4, 1);
|
|
SuccessButton1.OnClick = function() {
|
|
local T = {
|
|
op = 20059011,
|
|
Type = 10
|
|
}
|
|
SendPackEx(T);
|
|
}.bindenv(this);
|
|
SuccessButton1.SetCallBackFunc(function(Win) {
|
|
if (Parent && Parent.BaseInfo && Parent.BaseInfo.helpNum< 10) {
|
|
Win.State = 8;
|
|
} else {
|
|
Win.State = 0;
|
|
}
|
|
}.bindenv(this));
|
|
AddChild(SuccessButton1);
|
|
|
|
//完成按钮
|
|
local SuccessButton2 = LenheartNewUI_ButtonText(42 + 85 + 85, 420, 15, "完成");
|
|
SuccessButton2.DWidth = -5;
|
|
SuccessButton2.Width = 50;
|
|
SuccessButton2.SetTextOffset(-4, 1);
|
|
SuccessButton2.OnClick = function() {
|
|
local T = {
|
|
op = 20059011,
|
|
Type = 20
|
|
}
|
|
SendPackEx(T);
|
|
}.bindenv(this);
|
|
SuccessButton2.SetCallBackFunc(function(Win) {
|
|
if (Parent && Parent.BaseInfo && Parent.BaseInfo.helpNum< 20) {
|
|
Win.State = 8;
|
|
} else {
|
|
Win.State = 0;
|
|
}
|
|
}.bindenv(this));
|
|
AddChild(SuccessButton2);
|
|
|
|
}
|
|
|
|
//绘制主界面
|
|
function DrawMain(obj) {
|
|
if (!Parent || !Parent.BaseInfo) return;
|
|
|
|
L_sq_DrawImg("interface2/ui/aradpass/chn/aradpass.img", 42, X + 11, Y - 210 + 50 + 162);
|
|
|
|
L_sq_DrawCode("助力奖励", X + 11 + 115, Y - 210 + 50 + 162 + 7, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("[发起助力]说明", X + 11 + 372, Y - 210 + 50 + 162 + 7, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("获得助力 : " + Parent.BaseInfo.helpNum + " 次", X + 11 + 96, Y - 210 + 50 + 162 + 111, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
|
|
|
|
{
|
|
L_sq_DrawCode("社交功能将于每日凌晨6点重置。", X + 11 + 322, Y - 210 + 50 + 162 + 77, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("点击[发起助力]按钮时,立即获得通行", X + 11 + 308, Y - 210 + 50 + 162 + 77 + 20, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("券经验值。", X + 11 + 380, Y - 210 + 50 + 162 + 77 + 40, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("获得助力次数将根据服务器玩家的发起", X + 11 + 300, Y - 210 + 50 + 162 + 77 + 60, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("助力次数而更新。", X + 11 + 364, Y - 210 + 50 + 162 + 77 + 80, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("每10秒可以点击刷新按钮更新信息。", X + 11 + 310, Y - 210 + 50 + 162 + 77 + 100, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
}
|
|
|
|
L_sq_DrawCode("5次", X + 11 + 48, Y - 210 + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("10次", X + 11 + 132, Y - 210 + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
L_sq_DrawCode("20次", X + 11 + 216, Y - 210 + 50 + 162 + 148, sq_RGBA(124, 110, 82, 255), 1, 0);
|
|
|
|
|
|
//绘制道具
|
|
L_Sq_DrawItem(X + 103, Y - 210 + 262, 1232, Parent.BaseInfo.helpExp, 0, 0, 0);
|
|
|
|
L_Sq_DrawItem(X + 11 + 43, Y - 210 + 50 + 162 + 167, 1232, Parent.BaseInfo.helpExp5, 0, 0, 0);
|
|
L_Sq_DrawItem(X + 11 + 128, Y - 210 + 50 + 162 + 167, 1232, Parent.BaseInfo.helpExp10, 0, 0, 0);
|
|
L_Sq_DrawItem(X + 11 + 213, Y - 210 + 50 + 162 + 167, 1232, Parent.BaseInfo.helpExp20, 0, 0, 0);
|
|
}
|
|
|
|
function Show(obj) {
|
|
DrawMain(obj);
|
|
LenheartNewUI_Windows.Show(obj);
|
|
}
|
|
|
|
//逻辑入口
|
|
function Proc(obj) {
|
|
LenheartNewUI_Windows.SyncPos(X, Y - 210);
|
|
|
|
if (Parent && Parent.Visible && Parent.PageSelectM == 2) {
|
|
Visible = true;
|
|
X = Parent.X;
|
|
Y = Parent.Y + 210;
|
|
} else {
|
|
Visible = false;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// getroottable().rawdelete("AradPass_Obj"); |