Rindro-Sqr/Project/Fiendwar copy/FiendwarHallCreateParty.nut

81 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

2025-05-27 21:24:22 +08:00
/*
文件名:FiendwarHallCreateParty.nut
路径:Plugins/Fiendwar/FiendwarHallCreateParty.nut
创建日期:2024-03-18 13:20
文件用途:
*/
class FiendwarHallCreatePartyC extends LenheartNewUI_Windows {
//调试模式
DeBugMode = false;
X = 290;
Y = 220;
//输入框
InputObject = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
//关闭按钮
local CloseButton = LenheartNewUI_BaseButton(266, 2, 11, 12, "interface/lenheartwindowcommon.img", 276);
CloseButton.OnClick = function() {
CloseWindow();
}.bindenv(this);
AddChild(CloseButton);
local OkButton = LenheartNewUI_ButtonText(78, 124, 5, "确定");
OkButton.SetTextOffset(0, 1);
OkButton.OnClick = function() {
//如果队伍名输出框的文字长度大于0就创建队伍 创建时告诉服务端自己的 头发 帽子 脸部 皮肤
if (InputObject.str.len() > 0) {
local T = {
op = 20063001,
teamsName = InputObject.str,
items = [L_sq_GetCharacterAttribute(0x1c, 21), L_sq_GetCharacterAttribute(0x1c, 15), L_sq_GetCharacterAttribute(0x1c, 14), L_sq_GetCharacterAttribute(0x1c, 13)],
}
Rindro_BaseToolClass.SendPackEx(T);
CloseWindow();
}
}.bindenv(this);
AddChild(OkButton);
local CloseButton = LenheartNewUI_ButtonText(144, 124, 5, "取消");
CloseButton.SetTextOffset(0, 1);
CloseButton.OnClick = function() {
CloseWindow();
}.bindenv(this);
AddChild(CloseButton);
InputObject = LenheartNewUI_BaseInput(62, 68, 152, 20);
AddChild(InputObject);
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
}
//绘制主界面
function DrawMain(obj) {
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
L_sq_DrawImg("interface2/gcontents/180621_fiendwar/raid/raid_areaimg_fiend.img", 0, X + 11, Y + 21);
L_sq_DrawImg("hud/fiendwarl.img", 9, X - 2, Y + 2);
L_sq_DrawCode("创建攻坚队", X + 112, Y + 3, sq_RGBA(179, 169, 135, 255), 0, 1);
L_sq_DrawImg("hud/fiendwarl.img", 10, X + 72, Y + 44);
}
function Show(obj) {
DrawMain(obj);
LenheartNewUI_Windows.Show(obj);
}
//逻辑入口
function Proc(obj) {
LenheartNewUI_Windows.SyncPos(X, Y);
}
}