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

@@ -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);
}
}