public override void ResetButtonState(UnityEngine.EventSystems.PointerEventData.InputButton button) { if (this.isReleased == true && this.ClickCount > 0) { this.ClickCount = 0; } this.IsCancelled = false; this.isReleased = false; }
static int QPYX_set_button_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); UnityEngine.EventSystems.PointerEventData QPYX_obj_YXQP = (UnityEngine.EventSystems.PointerEventData)QPYX_o_YXQP; UnityEngine.EventSystems.PointerEventData.InputButton QPYX_arg0_YXQP = (UnityEngine.EventSystems.PointerEventData.InputButton)ToLua.CheckObject(L_YXQP, 2, typeof(UnityEngine.EventSystems.PointerEventData.InputButton)); QPYX_obj_YXQP.button = QPYX_arg0_YXQP; return(0); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index button on a nil value")); } }
static int QPYX_get_button_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); UnityEngine.EventSystems.PointerEventData QPYX_obj_YXQP = (UnityEngine.EventSystems.PointerEventData)QPYX_o_YXQP; UnityEngine.EventSystems.PointerEventData.InputButton QPYX_ret_YXQP = QPYX_obj_YXQP.button; ToLua.Push(L_YXQP, QPYX_ret_YXQP); return(1); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index button on a nil value")); } }
static int set_button(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.EventSystems.PointerEventData obj = (UnityEngine.EventSystems.PointerEventData)o; UnityEngine.EventSystems.PointerEventData.InputButton arg0 = (UnityEngine.EventSystems.PointerEventData.InputButton)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData.InputButton)); obj.button = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index button on a nil value" : e.Message)); } }
static int get_button(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.EventSystems.PointerEventData obj = (UnityEngine.EventSystems.PointerEventData)o; UnityEngine.EventSystems.PointerEventData.InputButton ret = obj.button; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index button on a nil value" : e.Message)); } }
static StackObject *set_button_32(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.EventSystems.PointerEventData.InputButton value = (UnityEngine.EventSystems.PointerEventData.InputButton) typeof(UnityEngine.EventSystems.PointerEventData.InputButton).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.EventSystems.PointerEventData instance_of_this_method; instance_of_this_method = (UnityEngine.EventSystems.PointerEventData) typeof(UnityEngine.EventSystems.PointerEventData).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.button = value; return(__ret); }
public override void ResetButtonState(UnityEngine.EventSystems.PointerEventData.InputButton button) { }
public override bool IsReleased(UnityEngine.EventSystems.PointerEventData.InputButton button) { return(UnityEngine.Input.GetMouseButtonUp((int)button)); }
public static bool checkType(IntPtr l, int p, out UnityEngine.EventSystems.PointerEventData.InputButton o) { return(checkEnum(l, p, out o)); }
private void OnBoardClickRegistered(GameView sender, int coordX, int coordY, UnityEngine.EventSystems.PointerEventData.InputButton btn) { var model = (GameModel)this._viewToModel[sender]; if (btn == PointerEventData.InputButton.Left) { // There is an undergoing placement. // This will not select units. if (_buildingPlacement != null) { var available = !GridManager.Instance.CheckOverlap(coordX, coordY, _buildingPlacement.Width, _buildingPlacement.Height, GridLayers.Buildings | GridLayers.Units); if (available) { model.AddBuilding(_buildingPlacement); _buildingPlacement.Placed = true; _buildingPlacement = null; sender.BoardHoverRegistered -= OnBoardHoverRegistered; } } else { bool hit = false; foreach (var selectable in model.Selectables) { // Check given coords with Rectangles of selectables. if (selectable.CheckOverlap(coordX, coordY)) { hit = true; if (_currentSelection != null) { _currentSelection.OnDeSelection(); } selectable.OnSelection(); _currentSelection = selectable; model.SelectedEntity = selectable; break; } } if (_currentSelection != null && !hit) { _currentSelection.OnDeSelection(); _currentSelection = null; model.SelectedEntity = null; } } } else if (btn == PointerEventData.InputButton.Right) { if (_currentSelection != null) { // Too tired to think something anything near engineering at this point. // Just getting things done. // We have only to entities that get right click commands. if (_currentSelection is SoldierModel) { SoldierModel soldier = (SoldierModel)_currentSelection; var path = GridManager.Instance.FindPath(soldier.CoordX, soldier.CoordY, coordX, coordY); if (path != null) { soldier.Path = path; } else { Debug.LogError("Could not find a path."); } } else if (_currentSelection is ProductionBuildingModel) { if (!GridManager.Instance.CheckOverlap(coordX, coordY, 1, 1, GridLayers.Buildings)) { ((ProductionBuildingModel)_currentSelection).RallyPoint = new Vector2(coordX, coordY); } } } } }
public override bool IsReleased(UnityEngine.EventSystems.PointerEventData.InputButton button) { return(this.isReleased); }
public override bool IsPressed(UnityEngine.EventSystems.PointerEventData.InputButton button) { return(this.ClickCount > 0); }