11
This commit is contained in:
104
Project/MarrySystem/MarrySystem_Request.nut
Normal file
104
Project/MarrySystem/MarrySystem_Request.nut
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
文件名:MarrySystem_Request.nut
|
||||
路径:Project/MarrySystem/MarrySystem_Request.nut
|
||||
创建日期:2024-10-01 00:03
|
||||
文件用途:结婚请求窗口
|
||||
*/
|
||||
class MarrySystem_RequestC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
Visible = false;
|
||||
|
||||
InputObject = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(308, 3, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
||||
InputObject = LenheartNewUI_BaseInput(83, 190, 160, 20);
|
||||
AddChild(InputObject);
|
||||
|
||||
//确认按钮
|
||||
local ConfirmButton = LenheartNewUI_ButtonText(83, 220, 15, "确认申请");
|
||||
ConfirmButton.DWidth = 18;
|
||||
ConfirmButton.Width = 74;
|
||||
ConfirmButton.SetTextOffset(-4, 1);
|
||||
ConfirmButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20055005,
|
||||
Name = InputObject.str,
|
||||
}
|
||||
SendPackEx(T);
|
||||
}.bindenv(this);
|
||||
AddChild(ConfirmButton);
|
||||
|
||||
|
||||
//取消按钮
|
||||
local CancelButton = LenheartNewUI_ButtonText(174, 220, 15, " 取 消");
|
||||
CancelButton.DWidth = 18;
|
||||
CancelButton.Width = 74;
|
||||
CancelButton.SetTextOffset(-4, 1);
|
||||
CancelButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CancelButton);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//绘制窗口底
|
||||
// L_sq_DrawWindow(X, Y, 347, 160, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
|
||||
//绘制窗口
|
||||
L_sq_DrawImg("marrysystem.img", 0, X, Y);
|
||||
|
||||
local Str = "请输入你想要与之订婚的角色名。";
|
||||
//绘制文字
|
||||
L_sq_DrawCode(Str, X + 80, Y + 150, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
local Str = "(直接点击想要订婚的角色,可自动输入名称。)";
|
||||
//绘制文字
|
||||
L_sq_DrawCode(Str, X + 53, Y + 166, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
getroottable().rawdelete("MarrySystem_Obj");
|
||||
|
||||
// function Lenheart_MarrySystem_Request_Fun(obj) {
|
||||
// local RootTab = getroottable();
|
||||
// if (!RootTab.rawin("MarrySystem_Request_Obj")) {
|
||||
// RootTab.rawset("MarrySystem_Request_Obj", true);
|
||||
// LenheartNewUI_CreateWindow(MarrySystem_RequestC, "结婚系统请求窗口", ((getroottable().Rindro_Scr_Width - 329) / 2).tointeger(), 140, 329, 267, 28);
|
||||
// }
|
||||
// }
|
||||
|
||||
// getroottable()["LenheartFuncTab"].rawset("MarrySystem_RequestFuncN", Lenheart_MarrySystem_Request_Fun);
|
||||
Reference in New Issue
Block a user