diff --git a/sqr/Core/UI_Class/UI_Core.nut b/sqr/Core/UI_Class/UI_Core.nut index 87796e5..70c66d4 100644 --- a/sqr/Core/UI_Class/UI_Core.nut +++ b/sqr/Core/UI_Class/UI_Core.nut @@ -475,7 +475,12 @@ function _Yosin_Windows_Mouse_Logic_(MouseState, Wheel, MousePos_X, MousePos_Y) _Imm_Input_Func_ <- {}; //输入逻辑入口 function _Yosin_Imm_Input_Logic_(Str) { - foreach(Func in _Imm_Input_Func_) { - Func(Str); + + foreach(Key, Func in _Imm_Input_Func_) { + local Ret = Func(Str); + //主体对象释放 删除自己 + if (Ret == -1) { + _Imm_Input_Func_.rawdelete(Key); + } } } \ No newline at end of file diff --git a/sqr/User/UI/Widget/InputBox.nut b/sqr/User/UI/Widget/InputBox.nut index 6bb9009..b17524d 100644 --- a/sqr/User/UI/Widget/InputBox.nut +++ b/sqr/User/UI/Widget/InputBox.nut @@ -69,6 +69,7 @@ class Yosin_InputBox extends Yosin_CommonUi { //接收文本数据 function Imm_Input(str) { + if (!this) return -1; if (!IsFocus) return; //退格键 if (str == "\b") {