public override Task <List <RunningRender> > RenderAsync(RenderRequest[] requests)
            {
                BeforeRender?.Invoke(requests);
                Task <List <RunningRender> > result = base.RenderAsync(requests);

                AfterRender(result, requests);
                return(result);
            }
Exemple #2
0
        public virtual void OnDraw(GraphicContext gc)
        {
            gc.AddMargin(Margin);
            CheckSize();

            if (Renderer == null)
            {
                Renderer = new DefaultWidgetRenderer();
            }

            BeforeRender?.Invoke(Renderer);

            Renderer.Render(gc, this);
        }
Exemple #3
0
        public void OnLoop(FrameTime frameTime)
        {
            CurrentTimestamp = frameTime.TotalSeconds;

            BeforeAll?.Invoke(frameTime);

            BeforeUpdate?.Invoke(frameTime);
            Update?.Invoke(frameTime);
            AfterUpdate?.Invoke(frameTime);

            BeforeRender?.Invoke(frameTime);
            Render?.Invoke(frameTime);
            AfterRender?.Invoke(frameTime);

            AfterAll?.Invoke(frameTime);
        }
Exemple #4
0
 public override void Render(ConsoleRenderer renderer, Region region)
 {
     BeforeRender?.Invoke();
     RenderedRegions.Add(region);
 }
Exemple #5
0
 protected virtual void OnBeforeRender(EventArgs e) => BeforeRender?.Invoke(this, e);
Exemple #6
0
 internal static void TrigBeforeRender() => BeforeRender?.Invoke();