This commit is contained in:
2025-08-27 08:45:37 +08:00
parent f3d0cbd222
commit 0d0465fad3
20 changed files with 2263 additions and 330 deletions

View File

@@ -192,6 +192,9 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
Duration = 0.0;
DurationFlag = 0.0;
//是否是焦点
IsFocus = false;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
ObjectId = gObjectId;
//宽度
@@ -211,6 +214,7 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
//调用原生方法
LenheartNewUI_BaseWindow.constructor();
}
//切换到最上层窗口 即得到焦点时
function ResetFocus() {
@@ -218,9 +222,17 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
foreach(Index, WindowObj in L_Windows_List) {
if (WindowObj.ObjectId == this.ObjectId) L_Windows_List.remove(Index);
}
for (local i = L_Windows_List.len() - 1; i >= 0; i--) {
if (L_Windows_List[i].ObjectId == this.ObjectId) {
L_Windows_List.remove(i);
}else{
L_Windows_List[i].IsFocus = false;
}
}
L_Windows_List.append(this);
//切换上层显示
getroottable().WindowsShowABFlag <- true;
IsFocus = true;
}
/*
@@ -329,7 +341,17 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
}
}
//绘制标题
function DrawWindowTitle(Width) {
//绘制标题
DrawTriptych(X - 1, Y, Width, "interface/lenheartwindowcommon.img", 9);
if (IsFocus) {
L_sq_SetDrawImgModel(2, 0);
DrawTriptychDetail(X - 1, Y , Width, "interface/lenheartwindowcommon.img", 109, 114, 115);
L_sq_ReleaseDrawImgModel();
}
}
//生成DT
function GenerateDt() {
try {
@@ -981,6 +1003,7 @@ class LenheartNewUI_BaseInput extends LenheartNewUI_CommonUi {
sliceCode = "|";
BaseTime = 0;
InputController = null;
CallBack = null;
constructor(X, Y, W, H) {
this.DWidth = W;
@@ -1015,8 +1038,11 @@ class LenheartNewUI_BaseInput extends LenheartNewUI_CommonUi {
if (InputController) {
local StrBuf = L_sq_GetInputBoxStr(InputController);
if (StrBuf != "LenheartNULL") str = StrBuf;
else {
if (StrBuf != "LenheartNULL") {
local oldStr = str;
str = StrBuf;
if (CallBack) CallBack(this, oldStr);
} else {
InputController = null;
InputState = 0;
}