UI核心类的 Proc与Update冲突修复
This commit is contained in:
parent
fc62731bcd
commit
eca5da2ff9
|
|
@ -25,6 +25,11 @@ class Yosin_BaseWindow extends Layer {
|
|||
Y = null;
|
||||
B_Y = null;
|
||||
|
||||
function _typeof() {
|
||||
return "Yosin_BaseWindow";
|
||||
}
|
||||
|
||||
//构造函数
|
||||
constructor(IsWindowFlag = false) {
|
||||
local ObjectBuf;
|
||||
//如果是游戏窗口类 则以Layer为基类 否则以Actor为基类
|
||||
|
|
@ -117,8 +122,6 @@ class Yosin_BaseWindow extends Layer {
|
|||
if (Window.UpdateFunc) Window.UpdateFunc(Window, Dt);
|
||||
Window.Proc(Dt);
|
||||
}
|
||||
//显示才调用Update
|
||||
if (Visible) base.OnUpdate(Dt);
|
||||
}
|
||||
//同步坐标
|
||||
function SyncPos(X, Y) {
|
||||
|
|
@ -199,6 +202,7 @@ class Yosin_Window extends Yosin_BaseWindow {
|
|||
base.constructor(true);
|
||||
|
||||
SetSize(Width, Height);
|
||||
SyncPos(X, Y);
|
||||
}
|
||||
|
||||
//切换到最上层窗口 即得到焦点时 全局窗口才调用 子窗口请不要调用此函数
|
||||
|
|
@ -337,6 +341,8 @@ class Yosin_Window extends Yosin_BaseWindow {
|
|||
//调用原生方法
|
||||
base.OnMouseWheel(Flag, MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//创建窗口
|
||||
|
|
@ -372,6 +378,8 @@ function _Yosin_Windows_Logic_(Dt, Ui_Layer) {
|
|||
}
|
||||
//无论窗口是否显示都需要调用Proc
|
||||
Window.Proc(Dt);
|
||||
//无论是否显示都调用Update
|
||||
Window.OnUpdate(Dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue