57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
|
|
/*
|
||
|
|
文件名:Training_State.nut
|
||
|
|
路径:Project/Trainingroom/Training_State.nut
|
||
|
|
创建日期:2025-12-13 02:23
|
||
|
|
文件用途:训练状态管理
|
||
|
|
*/
|
||
|
|
class Training_StateC extends LenheartNewUI_Windows {
|
||
|
|
//调试模式
|
||
|
|
// DeBugMode = true;
|
||
|
|
|
||
|
|
//不是窗口
|
||
|
|
NoWindow = true;
|
||
|
|
|
||
|
|
//是否可见
|
||
|
|
// Visible = false;
|
||
|
|
|
||
|
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||
|
|
Childrens = [];
|
||
|
|
//注册控件
|
||
|
|
RegisterWidget();
|
||
|
|
|
||
|
|
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||
|
|
}
|
||
|
|
|
||
|
|
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);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
//绘制主界面
|
||
|
|
function DrawMain(obj) {
|
||
|
|
L_sq_DrawCode("状态页面", X + 50, Y + 80, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||
|
|
}
|
||
|
|
|
||
|
|
function Show(obj) {
|
||
|
|
DrawMain(obj);
|
||
|
|
LenheartNewUI_Windows.Show(obj);
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
//逻辑入口
|
||
|
|
function Proc(obj) {
|
||
|
|
LenheartNewUI_Windows.SyncPos(X, Y - 28);
|
||
|
|
|
||
|
|
if (Parent && Parent.Visible) {
|
||
|
|
X = Parent.X;
|
||
|
|
Y = Parent.Y + 28;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|