111
This commit is contained in:
@@ -11,6 +11,9 @@ class MarrySystem_RequestC extends LenheartNewUI_Windows {
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//包头
|
||||
OP = 20078000;
|
||||
|
||||
//是否可见
|
||||
Visible = false;
|
||||
|
||||
@@ -26,33 +29,35 @@ class MarrySystem_RequestC extends LenheartNewUI_Windows {
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(308, 3, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
local CloseButton = LenheartNewUI_BaseButton(312, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
||||
InputObject = LenheartNewUI_BaseInput(83, 190, 160, 20);
|
||||
InputObject = LenheartNewUI_BaseInput(83, 90, 160, 20);
|
||||
AddChild(InputObject);
|
||||
|
||||
//确认按钮
|
||||
local ConfirmButton = LenheartNewUI_ButtonText(83, 220, 15, "确认申请");
|
||||
local ConfirmButton = LenheartNewUI_ButtonText(83, 120, 15, "确认申请");
|
||||
ConfirmButton.DWidth = 18;
|
||||
ConfirmButton.Width = 74;
|
||||
ConfirmButton.SetTextOffset(-4, 1);
|
||||
ConfirmButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20055005,
|
||||
op = OP + 3,
|
||||
Name = InputObject.str,
|
||||
}
|
||||
SendPackEx(T);
|
||||
R_Utils.PlaySound("BUTTON_06");
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(ConfirmButton);
|
||||
|
||||
|
||||
//取消按钮
|
||||
local CancelButton = LenheartNewUI_ButtonText(174, 220, 15, " 取 消");
|
||||
local CancelButton = LenheartNewUI_ButtonText(174, 120, 15, " 取 消");
|
||||
CancelButton.DWidth = 18;
|
||||
CancelButton.Width = 74;
|
||||
CancelButton.SetTextOffset(-4, 1);
|
||||
@@ -67,16 +72,22 @@ class MarrySystem_RequestC extends LenheartNewUI_Windows {
|
||||
//绘制窗口底
|
||||
// L_sq_DrawWindow(X, Y, 347, 160, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//标题栏
|
||||
L_sq_DrawButton(X - 1, Y, 320, "interface/lenheartwindowcommon.img", 609, 2, 7);
|
||||
//绘制窗口名字
|
||||
L_sq_DrawCode("申请订婚", X + 142, Y + 4, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X - 1, Y + 16, 312, 120, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//绘制窗口
|
||||
L_sq_DrawImg("marrysystem.img", 0, X, Y);
|
||||
// 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);
|
||||
L_sq_DrawCode(Str, X + 80, Y + 50, 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);
|
||||
L_sq_DrawCode(Str, X + 53, Y + 66, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
@@ -88,17 +99,14 @@ class MarrySystem_RequestC extends LenheartNewUI_Windows {
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
local Str = L_Sq_GetPlayerEachName();
|
||||
if (Str.len() > 0 && InputObject.str.len() == 0) {
|
||||
// InputObject.SetStr(Str);
|
||||
InputObject.str = Str;
|
||||
InputObject.SetStr(Str);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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);
|
||||
getroottable().rawdelete("MarrySystem_Obj");
|
||||
Reference in New Issue
Block a user