Beispiel #1
0
 public void RepositionItemsFrameDelayed(UXDragDelegate callback, int frames)
 {
     this.component.RepositionItems(true);
     this.repositionCallback   = callback;
     this.repositionWaitFrames = frames;
     Service.ViewTimeEngine.RegisterFrameTimeObserver(this);
 }
Beispiel #2
0
 public void OnViewFrameTime(float dt)
 {
     if (--this.repositionWaitFrames == 0)
     {
         if (Service.ViewTimeEngine != null)
         {
             Service.ViewTimeEngine.UnregisterFrameTimeObserver(this);
         }
         else if (Service.Logger != null)
         {
             Service.Logger.Error("AbstractUXList.OnViewFrameTime: For some reason ViewTimeEngine is null.");
         }
         this.RepositionItems();
         if (this.repositionCallback != null)
         {
             this.repositionCallback(this);
             this.repositionCallback = null;
         }
     }
 }
Beispiel #3
0
        public void OnViewFrameTime(float dt)
        {
            int num = this.repositionWaitFrames - 1;

            this.repositionWaitFrames = num;
            if (num == 0)
            {
                if (Service.IsSet <ViewTimeEngine>())
                {
                    Service.Get <ViewTimeEngine>().UnregisterFrameTimeObserver(this);
                }
                else if (Service.IsSet <StaRTSLogger>())
                {
                    Service.Get <StaRTSLogger>().Error("AbstractUXList.OnViewFrameTime: For some reason ViewTimeEngine is null.");
                }
                this.RepositionItems();
                if (this.repositionCallback != null)
                {
                    this.repositionCallback(this);
                    this.repositionCallback = null;
                }
            }
        }
Beispiel #4
0
 public void RepositionItemsFrameDelayed(UXDragDelegate callback)
 {
     this.RepositionItemsFrameDelayed(callback, 1);
 }