public void Call(InputUILongPressEvent param0) { func.BeginPCall(); func.PushObject(param0); func.PCall(); func.EndPCall(); }
public static void DispatchLongPressEvent(string UIName, string ComponentName, string parm, InputUIEventType type) { //只有允许输入时才派发事件 if (IsActive) { InputUILongPressEvent e = GetUIEvent <InputUILongPressEvent>(UIName, ComponentName, parm); e.m_LongPressType = type; InputManager.Dispatch("InputUILongPressEvent", e); } }
public static InputEventRegisterInfo <InputUILongPressEvent> GetLongPressListener(LongPressAcceptor acceptor, string UIName, string ComponentName, string parm, InputEventHandle <InputUILongPressEvent> callback) { InputlongPressRegisterInfo info = HeapObjectPool <InputlongPressRegisterInfo> .GetObject(); info.eventKey = InputUILongPressEvent.GetEventKey(UIName, ComponentName, parm); info.callBack = callback; info.m_acceptor = acceptor; info.m_OnLongPress = (type) => { DispatchLongPressEvent(UIName, ComponentName, parm, type); }; return(info); }
public InputEventRegisterInfo <InputUILongPressEvent> GetLongPressRegisterInfo(string compName, InputEventHandle <InputUILongPressEvent> callback, string parm) { string eventKey = InputUILongPressEvent.GetEventKey(UIName, compName, parm); for (int i = 0; i < m_LongPressEvents.Count; i++) { InputEventRegisterInfo <InputUILongPressEvent> info = (InputEventRegisterInfo <InputUILongPressEvent>)m_LongPressEvents[i]; if (info.eventKey == eventKey && info.callBack == callback) { return(info); } } throw new Exception("GetLongPressRegisterInfo Exception not find RegisterInfo by " + compName + " parm " + parm); }
static int GetEventKey(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string arg2 = ToLua.CheckString(L, 3); string o = InputUILongPressEvent.GetEventKey(arg0, arg1, arg2); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_m_LongPressType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); InputUILongPressEvent obj = (InputUILongPressEvent)o; InputUIEventType arg0 = (InputUIEventType)ToLua.CheckObject(L, 2, typeof(InputUIEventType)); obj.m_LongPressType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_LongPressType on a nil value" : e.Message)); } }
static int get_m_LongPressType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); InputUILongPressEvent obj = (InputUILongPressEvent)o; InputUIEventType ret = obj.m_LongPressType; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_LongPressType on a nil value" : e.Message)); } }
static int _CreateInputUILongPressEvent(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { InputUILongPressEvent obj = new InputUILongPressEvent(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: InputUILongPressEvent.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void OnLongPress(InputUILongPressEvent e) { Debug.Log("长按...." + e.m_type + ":" + e.m_t); }