This commit is contained in:
parent
16be225768
commit
8c2522f366
|
|
@ -43,6 +43,8 @@ function L_drawMainCustomUI_All() {
|
|||
getroottable().rawdelete("OnlineAnnouncement_Obj");
|
||||
//血槽UI
|
||||
getroottable().rawdelete("HudUi_Obj");
|
||||
//交互UI
|
||||
getroottable().rawdelete("L_Each_Obj");
|
||||
|
||||
//战令
|
||||
getroottable().rawdelete("AradPass_Obj");
|
||||
|
|
@ -150,20 +152,6 @@ function L_drawMainCustomUI_All() {
|
|||
|
||||
|
||||
|
||||
// local EachCount = 0;
|
||||
// local EachClassObject = L_sq_RA(0x1ADE0E0);
|
||||
// if (EachClassObject) {
|
||||
// local FristChildOffset = (EachClassObject + 0x68);
|
||||
// for (local i = 0; i< 74; i++) {
|
||||
// local AddressBuf = FristChildOffset + (4 * i);
|
||||
// local ChildAddress = L_sq_RA(AddressBuf);
|
||||
// if (ChildAddress) {
|
||||
// local OpenFlag = L_sq_RA(ChildAddress + 0xC);
|
||||
// if (OpenFlag == 257) EachCount++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// print(EachCount);
|
||||
|
||||
// for (local i = 0; i< 400; i++) {
|
||||
// local WindowAddress = L_sq_GetWindowById(i);
|
||||
|
|
|
|||
|
|
@ -359,9 +359,8 @@ class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
|
|||
local WindowX = sq_GetPopupWindowMainCotrol(74);
|
||||
local WindowAddress = L_sq_GetWindowById(74);
|
||||
if (!WindowX || !WindowAddress) return false;
|
||||
|
||||
//确定是个人信息窗口才执行逻辑 并且返回true 不执行原逻辑
|
||||
if (Address - WindowAddress <= 0x20000) {
|
||||
if (Address - WindowAddress <= 0x50000 && L_sq_RA(Address + 0x34) == 4089) {
|
||||
OldWindowAddress = Address;
|
||||
local obj = sq_getMyCharacter();
|
||||
RealShow(obj);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
文件名:Lenheart_Each_Class.nut
|
||||
路径:Base/UI/Lenheart_Each_Class.nut
|
||||
创建日期:2024-09-30 14:46
|
||||
文件用途:交互界面类
|
||||
*/
|
||||
class LenheartNewUI_Each_BaseButton extends LenheartNewUI_CommonUi {
|
||||
State = 0;
|
||||
BaseIdx = 29;
|
||||
DWidth = null;
|
||||
Path = null;
|
||||
Idx = null;
|
||||
SetFlag = null;
|
||||
SetIndex = null;
|
||||
|
||||
Icon = null;
|
||||
IconIdx = null;
|
||||
Str = null;
|
||||
StrColor = sq_RGBA(189, 159, 126, 250);
|
||||
|
||||
constructor(X, Y, W, H, Path, Idx) {
|
||||
this.DWidth = W;
|
||||
this.Path = Path;
|
||||
this.Idx = Idx;
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, W, H);
|
||||
|
||||
}
|
||||
|
||||
function SetFrame(gPath, gIdx) {
|
||||
if (gPath) Path = gPath;
|
||||
Idx = gIdx;
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//不可用
|
||||
if (State == 8) {
|
||||
// L_sq_DrawImg(Path, Idx + 3, X, Y);
|
||||
} else {
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
L_sq_DrawImg(Path, Idx + 1, X, Y);
|
||||
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 2);
|
||||
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 5, StrColor, 0, 1);
|
||||
}
|
||||
//悬停
|
||||
else if (isInRect) {
|
||||
L_sq_DrawImg(Path, Idx, X, Y);
|
||||
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 1);
|
||||
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 4, StrColor, 0, 1);
|
||||
}
|
||||
//普通
|
||||
else {
|
||||
L_sq_DrawImg(Path, 0, X, Y);
|
||||
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 1);
|
||||
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 4, StrColor, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
if (isLBDown && OnClick) {
|
||||
OnClick(this);
|
||||
}
|
||||
isLBDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
class Lenheart_EachC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
// Visible = false;
|
||||
|
||||
Info = null;
|
||||
|
||||
NPC_Index = null;
|
||||
NPC_Flag = false;
|
||||
NPC_ButtonMap = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
NPC_ButtonMap = {};
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
|
||||
}
|
||||
|
||||
function TopShow(obj) {
|
||||
if (NPC_Index) {
|
||||
SyncPos();
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
}
|
||||
|
||||
function DrawMain(obj) {
|
||||
// if (Info) {
|
||||
// local NPC_Index = Rindro_BaseToolClass.GetEachNpcId();
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// function BottomShow() {}
|
||||
|
||||
//初始化NPC按钮
|
||||
function InitNpcButton() {
|
||||
Childrens = [];
|
||||
if (NPC_ButtonMap.rawin(NPC_Index)) {
|
||||
NPC_ButtonMap[NPC_Index](this);
|
||||
}
|
||||
this.Visible = true;
|
||||
}
|
||||
|
||||
function AddEachForNpc(Index, Func) {
|
||||
NPC_ButtonMap.rawset(Index, Func);
|
||||
}
|
||||
|
||||
function RemoveEachForNpc(Index) {
|
||||
NPC_ButtonMap.rawdelete(Index);
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
NPC_Index = Rindro_BaseToolClass.GetEachNpcId();
|
||||
if (NPC_Index) {
|
||||
if (!NPC_Flag) {
|
||||
NPC_Flag = true;
|
||||
InitNpcButton();
|
||||
}
|
||||
} else {
|
||||
NPC_Flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
function CloseAllEach() {
|
||||
local EachClassObject = L_sq_RA(0x1ADE0E0);
|
||||
if (EachClassObject) {
|
||||
local FristChildOffset = (EachClassObject + 0x68);
|
||||
for (local i = 0; i< 74; i++) {
|
||||
local AddressBuf = FristChildOffset + (4 * i);
|
||||
local ChildAddress = L_sq_RA(AddressBuf);
|
||||
if (ChildAddress) {
|
||||
local OpenFlag = L_sq_RA(ChildAddress + 0xC);
|
||||
if (OpenFlag = 257) L_sq_WA(ChildAddress + 0xC, 256);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Lenheart_Get_Each_Info() {
|
||||
local EachCount = 0;
|
||||
local Xpos = 0;
|
||||
local Ypos = 0;
|
||||
local EachClassObject = L_sq_RA(0x1ADE0E0);
|
||||
if (EachClassObject) {
|
||||
local FristChildOffset = (EachClassObject + 0x68);
|
||||
for (local i = 0; i< 74; i++) {
|
||||
local AddressBuf = FristChildOffset + (4 * i);
|
||||
local ChildAddress = L_sq_RA(AddressBuf);
|
||||
if (ChildAddress) {
|
||||
local OpenFlag = L_sq_RA(ChildAddress + 0xC);
|
||||
if (OpenFlag == 257) EachCount++;
|
||||
}
|
||||
//第0个的时候记录一下坐标
|
||||
if (i == 0) {
|
||||
Xpos = L_sq_RA(ChildAddress + 0x14);
|
||||
Ypos = L_sq_RA(ChildAddress + 0x18);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
Count = EachCount,
|
||||
X = Xpos,
|
||||
Y = Ypos
|
||||
};
|
||||
}
|
||||
|
||||
//override
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
//调用原生方法
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function SyncPos() {
|
||||
//读取交互坐标数据
|
||||
Info = Lenheart_Get_Each_Info();
|
||||
|
||||
X = Info.X;
|
||||
Y = Info.Y + (21 * Info.Count);
|
||||
//宽度
|
||||
Width = 100;
|
||||
//高度
|
||||
Height = (21 * Childrens.len());
|
||||
// //同步子对象坐标
|
||||
// foreach(winobj in Childrens) {
|
||||
// winobj.X = Info.X;
|
||||
// winobj.Y = Info.Y + (21 * Info.Count);
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Lenheart_Each_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("L_Each_Obj")) {
|
||||
RootTab.rawset("L_Each_Obj", LenheartNewUI_CreateWindow(Lenheart_EachC, "玩家与NPC交互界面窗口", 0, 0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_EachN", Lenheart_Each_Fun);
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x10041D0, ["int", "int", "int"],
|
||||
// function(args) {
|
||||
// if (getroottable().rawin("L_Each_Obj")) {
|
||||
// getroottable()["L_Each_Obj"].BottomShow();
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// return null;
|
||||
// });
|
||||
|
|
@ -465,7 +465,8 @@ function CheackMouseInOldWindows() {
|
|||
|
||||
//空地
|
||||
if (Flag == 0x184D0C4 || Flag == 0x0184CF6C) {
|
||||
if ((L_sq_RA(WindowAddress + 0x14) == 0 && L_sq_RA(WindowAddress + 0x18) == 0)) {
|
||||
//都为0的时候城镇背景 508是血槽那一块的逻辑 坐标Y是508
|
||||
if ((L_sq_RA(WindowAddress + 0x14) == 0 && (L_sq_RA(WindowAddress + 0x18) == 0 || L_sq_RA(WindowAddress + 0x18) == 508))) {
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
|
|
@ -599,7 +600,7 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
|||
//打开原生窗口回调
|
||||
function L_OpenOldWindowCallBack(WindowIndex) {
|
||||
//将新窗口渲染队列改为下层 抵消窗口 Esc窗口 登录可能显示的任务窗口
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 283) {
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 283 && WindowIndex != 36) {
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,10 +399,12 @@ class ItemInfoClass {
|
|||
// L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], Ret, 600, 200, 28, 28);
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x11C0410, ["int", "int", "int", "int"],
|
||||
|
||||
// Rindro_Haker.LoadHook(0x11BD160, ["int", "int", "bool"],
|
||||
// function(args) {
|
||||
// args[0] = -1;
|
||||
// // print(args[0]);
|
||||
// return null;
|
||||
// return args;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(args.pop());
|
||||
|
|
@ -423,3 +425,34 @@ class ItemInfoClass {
|
|||
// print("***********************");
|
||||
// print(Str2);
|
||||
// print(Str2.len());
|
||||
|
||||
function getScrollBasisPos_Swordman(obj) {
|
||||
print(111);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function drawAppend_VirtualCharacter(ChrJob, GrowJob, Sc_Xpos, Sc_Ypos, Front_After_Flag, f) {
|
||||
// local obj = sq_GetMyMasterCharacter();
|
||||
// print(Clock());
|
||||
// Sout("a: %L",a);
|
||||
// Sout("b: %L",b);
|
||||
// Sout("c: %L",c);
|
||||
// Sout("d: %L",d);
|
||||
// Sout("e: %L",e);
|
||||
// Sout("f: %L",f);
|
||||
// print(a);
|
||||
// print(b);
|
||||
// print(c);
|
||||
// print(d);
|
||||
// print(e);
|
||||
// print(f);
|
||||
|
||||
// if (!e) {
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Bottom_00.ani", c, d, "Server_AuctionSystemTimeP22");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_2/Chivalry_S3_Text.ani", c, d, "Server_AuctionSystemTimeP");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Text.ani", c, d - 50, "Server_AuctionSystemTimeP2");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_3/Chivalry_S3_Text.ani", c, d - 100, "Server_AuctionSystemTimeP3");
|
||||
// }
|
||||
}
|
||||
|
|
@ -29,6 +29,7 @@ dofile("sqr/Base/UI/Lenheart_Cursor_Class.nut"); //鼠标类
|
|||
dofile("sqr/Base/UI/OldWindowsMap.nut"); //窗口Map
|
||||
dofile("sqr/Base/UI/Lenheart_UI_Class.nut"); //UI
|
||||
dofile("sqr/Base/UI/Lenheart_Ani_Class.nut"); //Ani
|
||||
dofile("sqr/Base/UI/Lenheart_Each_Class.nut"); //交互图标类
|
||||
dofile("sqr/Base/UI/Lenheart_Event_Class.nut"); //活动图标
|
||||
dofile("sqr/Base/UI/Lenheart_Character_Info_Class.nut"); //个人信息属性面板
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@ class HorseGuessing_KnightInfoC extends LenheartNewUI_Windows {
|
|||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
AniList = [];
|
||||
for (local i = 0; i< 13; i++) {
|
||||
local obj = sq_getMyCharacter();
|
||||
local ani = obj.getVar().GetAnimationMap("common/horseguessing/knight" + i + ".ani", "common/horseguessing/knight" + i + ".ani");
|
||||
AniList.append({
|
||||
ani = ani,
|
||||
flag = false
|
||||
});
|
||||
}
|
||||
// AniList = [];
|
||||
// for (local i = 0; i< 13; i++) {
|
||||
// local obj = sq_getMyCharacter();
|
||||
// local ani = obj.getVar().GetAnimationMap("common/horseguessing/knight" + i + ".ani", "common/horseguessing/knight" + i + ".ani");
|
||||
// AniList.append({
|
||||
// ani = ani,
|
||||
// flag = false
|
||||
// });
|
||||
// }
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
|
|
@ -127,13 +127,13 @@ class HorseGuessing_KnightInfoC extends LenheartNewUI_Windows {
|
|||
InputObject.SetStr(Parent.ResidueCoin.tostring());
|
||||
}
|
||||
|
||||
//在城镇的时候才播放
|
||||
if (sq_GetCurrentModuleType() == 1) {
|
||||
foreach(value in AniList) {
|
||||
sq_AnimationProc(value.ani);
|
||||
sq_drawCurrentFrame(value.ani, -600, 0, true);
|
||||
}
|
||||
}
|
||||
// //在城镇的时候才播放
|
||||
// if (sq_GetCurrentModuleType() == 1) {
|
||||
// foreach(value in AniList) {
|
||||
// sq_AnimationProc(value.ani);
|
||||
// sq_drawCurrentFrame(value.ani, -600, 0, true);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,9 @@ class HudUiC extends LenheartNewUI_Windows {
|
|||
|
||||
//干掉废弃的深渊悬停提示
|
||||
MemoryTool.WirteByteArr(0xE6D90C, [0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
|
||||
//修复点击邮箱会乱跳鼠标
|
||||
L_sq_WAB(0x11BD16E, 0xEB);
|
||||
}
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
文件名:MarrySystem.nut
|
||||
路径:Project/MarrySystem/MarrySystem.nut
|
||||
创建日期:2024-10-01 00:01
|
||||
文件用途:结婚系统
|
||||
*/
|
||||
|
||||
dofile("sqr/Project/MarrySystem/MarrySystem_Request.nut");
|
||||
|
||||
class MarrySystemC extends Rindro_BaseToolClass {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
// Visible = false;
|
||||
|
||||
//包头
|
||||
OP = 20099000;
|
||||
|
||||
//自身是否结婚
|
||||
IsMarryFlag = false;
|
||||
|
||||
//申请订婚窗口
|
||||
ApplyEngagementWindow = null;
|
||||
|
||||
|
||||
//查看自己是否有结婚
|
||||
function CheckMarry() {
|
||||
SendPackEx({
|
||||
op = OP + 1
|
||||
});
|
||||
}
|
||||
|
||||
function CheckMarryCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
IsMarryFlag = Jso.Flag;
|
||||
InitNpcEachButton();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
|
||||
|
||||
ApplyEngagementWindow = MarrySystem_RequestC("结婚系统_申请订婚窗口", ((getroottable().Rindro_Scr_Width - 329) / 2).tointeger(), 140, 329, 267, 28);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//注册NPC按钮
|
||||
function InitNpcEachButton() {
|
||||
local EachManager = getroottable()["L_Each_Obj"];
|
||||
//先清空注册
|
||||
EachManager.RemoveEachForNpc(20013);
|
||||
|
||||
//没结婚注册申请结婚按钮
|
||||
if (!IsMarryFlag) {
|
||||
EachManager.AddEachForNpc(20013, function(SThis) {
|
||||
//关闭按钮
|
||||
local ApplyEngagementButton = LenheartNewUI_Each_BaseButton(0, 0, 100, 21, "interface2/popup_menu/popup_back.img", 3);
|
||||
ApplyEngagementButton.Icon = "interface2/popup_menu/popup_icon_cn.img";
|
||||
ApplyEngagementButton.IconIdx = 10;
|
||||
ApplyEngagementButton.Str = "申请结婚";
|
||||
ApplyEngagementButton.OnClick = function(Button) {
|
||||
Button.Parent.CloseAllEach();
|
||||
Button.Parent.CloseWindow();
|
||||
ApplyEngagementWindow.Visible = true;
|
||||
ApplyEngagementWindow.ResetFocus();
|
||||
}.bindenv(this);
|
||||
ApplyEngagementButton.SetCallBackFunc(function(Button) {})
|
||||
SThis.AddChild(ApplyEngagementButton);
|
||||
}.bindenv(this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
getroottable().rawdelete("MarrySystem_Obj");
|
||||
|
||||
function Lenheart_MarrySystem_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("MarrySystem_Obj")) {
|
||||
RootTab.rawset("MarrySystem_Obj", MarrySystemC());
|
||||
} else {
|
||||
RootTab["MarrySystem_Obj"].Proc(obj);
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("MarrySystemFuncN", Lenheart_MarrySystem_Fun);
|
||||
|
|
@ -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);
|
||||
|
|
@ -103,5 +103,8 @@
|
|||
},
|
||||
"Project/SkinHub": {
|
||||
"description": "皮肤中心"
|
||||
},
|
||||
"Project/MarrySystem": {
|
||||
"description": "结婚系统"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue