public void RepositionItemsFrameDelayed(UXDragDelegate callback, int frames) { this.component.RepositionItems(true); this.repositionCallback = callback; this.repositionWaitFrames = frames; Service.ViewTimeEngine.RegisterFrameTimeObserver(this); }
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; } } }
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; } } }
public void RepositionItemsFrameDelayed(UXDragDelegate callback) { this.RepositionItemsFrameDelayed(callback, 1); }