public static void Register(Func<Rect> del)
 {
     if (mInstance == null)
     {
         mInstance = new EZGUIPointerDisablePatcher();
     }
     mInstance.mDelegate += del;
 }
 public static void Register(Func <Rect> del)
 {
     if (mInstance == null)
     {
         mInstance = new EZGUIPointerDisablePatcher();
     }
     mInstance.mDelegate += del;
 }
 public virtual void Hide()
 {
     if (!Enabled)
     {
         return;
     }
     Enabled = false;
     RenderingManager.RemoveFromPostDrawQueue(0, Draw);
     EZGUIPointerDisablePatcher.Unregister(GetArea);
 }
 public virtual void Show()
 {
     if (Enabled)
     {
         return;
     }
     Enabled = true;
     RTUtil.Log("Enabled");
     RenderingManager.AddToPostDrawQueue(0, Draw);
     EZGUIPointerDisablePatcher.Register(GetArea);
 }
 public static void Register(EZGUIRequestRectDelegate del)
 {
     if (mInstance != null && mInstance.mManager != UIManager.instance) {
         mInstance.Dispose();
         mInstance = null;
     }
     if (mInstance == null) {
         mInstance = new EZGUIPointerDisablePatcher();
     }
     mInstance.mDelegate += del;
 }
 private void EZGUIMouseTouchPtrListener(POINTER_INFO ptr)
 {
     if (mDelegate == null || mDelegate.GetInvocationList().Length == 0) {
         this.Dispose();
         mInstance = null;
     }
     foreach (EZGUIRequestRectDelegate d in mDelegate.GetInvocationList()) {
         if (d().Contains(new Vector2(ptr.devicePos.x, Screen.height - ptr.devicePos.y))) {
             mUsedPointers[0] = true;
         }
     }
 }
Beispiel #7
0
 public static void Register(EZGUIRequestRectDelegate del)
 {
     if (mInstance != null && mInstance.mManager != UIManager.instance)
     {
         mInstance.Dispose();
         mInstance = null;
     }
     if (mInstance == null)
     {
         mInstance = new EZGUIPointerDisablePatcher();
     }
     mInstance.mDelegate += del;
 }
Beispiel #8
0
 public virtual void Show()
 {
     if (Enabled)
     {
         return;
     }
     if (Windows.ContainsKey(mGuid))
     {
         Windows[mGuid].Hide();
     }
     Windows[mGuid] = this;
     Enabled        = true;
     EZGUIPointerDisablePatcher.Register(RequestPosition);
 }
 private void EZGUIMouseTouchPtrListener(POINTER_INFO ptr)
 {
     if (mDelegate == null || mDelegate.GetInvocationList().Length == 0)
     {
         this.Dispose();
         mInstance = null;
     }
     foreach (EZGUIRequestRectDelegate d in mDelegate.GetInvocationList())
     {
         if (d().Contains(new Vector2(ptr.devicePos.x, Screen.height - ptr.devicePos.y)))
         {
             mUsedPointers[0] = true;
         }
     }
 }
Beispiel #10
0
 public virtual void Hide()
 {
     Windows.Remove(mGuid);
     Enabled = false;
     EZGUIPointerDisablePatcher.Unregister(RequestPosition);
 }
Beispiel #11
0
 public void Dispose()
 {
     GameEvents.onPlanetariumTargetChanged.Remove(ChangeTarget);
     MapView.OnExitMapView -= OnExitMapView;
     EZGUIPointerDisablePatcher.Unregister(GetArea);
 }
Beispiel #12
0
 public MapViewConfigFragment()
 {
     GameEvents.onPlanetariumTargetChanged.Add(ChangeTarget);
     MapView.OnExitMapView += OnExitMapView;
     EZGUIPointerDisablePatcher.Register(GetArea);
 }