This commit is contained in:
2024-10-05 11:46:39 +08:00
parent 8c2522f366
commit c1df659af4
12 changed files with 556 additions and 65 deletions

View File

@@ -158,7 +158,15 @@ function L_drawMainCustomUI_All() {
// if (WindowAddress != 0) print(format("%02X", WindowAddress));
// if (WindowAddress == 0x39F56000) print(i);
// }
// if (Clock() - getroottable().SINNU >= 10) {
// getroottable().SINNU = Clock();
// L_sq_MoveTown(1, 1, 474, 249);
// }
// print(sq_GetCurrentModuleType());
}
// getroottable().SINNU <- Clock();
// getroottable().Lsnzz <- Clock();
// dofile("sqr/Base/_Tool/Json.nut");

View File

@@ -212,12 +212,12 @@ class Lenheart_EachC extends LenheartNewUI_Windows {
Width = 100;
//高度
Height = (21 * Childrens.len());
// //同步子对象坐标
// foreach(winobj in Childrens) {
// winobj.X = Info.X;
// winobj.Y = Info.Y + (21 * Info.Count);
//同步子对象坐标
foreach(pos, winobj in Childrens) {
winobj.X = Info.X;
winobj.Y = Info.Y + (21 * (Info.Count + pos));
// }
}
}
}

View File

@@ -535,8 +535,8 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
RunMouseLogic(MousePos_X, MousePos_Y);
}
//判断是否悬停活动图标
if (getroottable().rawin("EventList_Obj")) EventList_Obj.CheckInEvent(MousePos_X, MousePos_Y);
//判断是否悬停活动图标 没悬停在老窗口上 没在选图界面
if (getroottable().rawin("EventList_Obj") && !CheackMouseInOldWindows() && sq_GetCurrentModuleType() != 2) EventList_Obj.CheckInEvent(MousePos_X, MousePos_Y);
//如果渲染层级在下级 即A层 或者是 鼠标没有悬停在任何新窗口上时 执行判断 如果悬停在原生窗口 就解除鼠标锁定 如果点击 就改变渲染层级
@@ -611,10 +611,10 @@ function L_WindowsLogic(obj) {
local WindowExistence = false;
//遍历窗口队列 如果可见则调用Show 只要有一个可见就写入Flag
foreach(Window in L_Windows_List) {
Window.Proc(obj);
if (sq_GetCurrentModuleType() != 2) Window.Proc(obj);
if (Window.Visible) {
Window.Show(obj);
Window.TopShow(obj);
if (sq_GetCurrentModuleType() != 2) Window.Show(obj);
if (sq_GetCurrentModuleType() != 2) Window.TopShow(obj);
if (!Window.rawin("NoWindow")) {
WindowExistence = true;
}
@@ -638,23 +638,26 @@ function L_WindowsLogic(obj) {
}
}
//如果按下ESC键要将所有的窗口关闭
if (KeyPressNB.isKeyPress(48, "AllLenheartWindows")) {
local Flag = false;
foreach(Window in L_Windows_List) {
if (!Window.rawin("NoWindow")) {
Flag = true;
Window.CloseWindow();
if (WindowExistence) {
if (KeyPressNB.isKeyPress(48, "AllLenheartWindows") || sq_GetCurrentModuleType() == 2) {
local Flag = false;
foreach(Window in L_Windows_List) {
if (!Window.rawin("NoWindow")) {
Flag = true;
Window.CloseWindow();
}
}
if (Flag) {
getroottable().WindowsShowABFlag <- false;
//还原鼠标
R_Mouse.Restore();
L_Sq_CallFunc(0x11A8B60, "void", FFI_MS_CDECL, []);
// L_sq_MouseClick();
Rindro_MouseClickFlag = 5;
}
}
if (Flag) {
getroottable().WindowsShowABFlag <- false;
//还原鼠标
R_Mouse.Restore();
L_Sq_CallFunc(0x11A8B60, "void", FFI_MS_CDECL, []);
// L_sq_MouseClick();
Rindro_MouseClickFlag = 5;
}
}
}
//绘制下层回调
function L_DrawWindow_A() {
@@ -951,6 +954,7 @@ class LenheartNewUI_BaseInput extends LenheartNewUI_CommonUi {
class LenheartNewUI_SwitchButton extends LenheartNewUI_CommonUi {
State = 0;
ImgIndex = null;
ImgPath = "interface/lenheartwindowcommon.img";
constructor(X, Y) {
LenheartNewUI_CommonUi.constructor(X, Y, 14, 15);
@@ -959,25 +963,25 @@ class LenheartNewUI_SwitchButton extends LenheartNewUI_CommonUi {
function Show(obj) {
//不可用
if (State == 8) {
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex + 3 : 141, X, Y + 1);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex + 3 : 141, X, Y + 1);
} else {
//悬停
if (isLBDown) {
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex + 2 : 140, X, Y + 1);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex + 2 : 140, X, Y + 1);
}
//按下
else if (isInRect) {
if (State == 0)
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex + 1 : 139, X, Y);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex + 1 : 139, X, Y);
if (State == 1)
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex + 2 : 140, X, Y);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex + 2 : 140, X, Y);
}
//普通
else {
if (State == 0)
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex : 138, X, Y);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex : 138, X, Y);
if (State == 1)
L_sq_DrawImg("interface/lenheartwindowcommon.img", ImgIndex ? ImgIndex + 2 : 140, X, Y);
L_sq_DrawImg(ImgPath, ImgIndex ? ImgIndex + 2 : 140, X, Y);
}
}

View File

@@ -27,4 +27,19 @@ class _Rindro_Hacker {
}
}
//初始化Hacker
Rindro_Haker <- _Rindro_Hacker();
if (!(getroottable().rawin("Rindro_Haker"))) Rindro_Haker <- _Rindro_Hacker();
//重选角色时触发的回调函数(进入赛利亚房间)
OnSetCharacter_Control <- {}
Rindro_Haker.LoadHook(0x674350, ["pointer", "int"],
function(args) {
foreach(Func in OnSetCharacter_Control) {
Func();
}
return null;
},
function(args) {
return null;
});

View File

@@ -38,5 +38,14 @@ class R_Utils {
return Ret;
}
//获取一个指定装备的角色Ani
function GetCharacByEqu(Job, GrowType, Equ) {
local Obj = sq_CreateCharacter(Job, GrowType);
local ObjAddress = L_Sq_GetObjectAddress(Obj);
foreach(value in Equ) {
local ItemObject = L_sq_GetItem(value);
L_Sq_CallFunc(0x825570, "void", FFI_THISCALL, ["int", "int"], ObjAddress, ItemObject);
}
return Obj;
}
}