Esempio n. 1
0
 public override void Draw(double delta)
 {
     RenderMaterial.VertexLighting = true;
     scene.Draw();
     ui.RenderWidget(delta);
     DoFade(delta);
     cur.Draw(Game.RenderContext.Renderer2D, Game.Mouse, Game.TotalTime);
 }
Esempio n. 2
0
 public override void Draw(TimeSpan delta)
 {
     if (scene != null)
     {
         scene.Draw();
     }
     hud.Draw();
     Game.Renderer2D.Start(Game.Width, Game.Height);
     cursor.Draw(Game.Renderer2D, Game.Mouse);
     Game.Renderer2D.Finish();
 }
Esempio n. 3
0
        public override void Draw(double delta)
        {
            RenderMaterial.VertexLighting = true;
            if (scene != null)
            {
                scene.Draw();
            }
            ui.RenderWidget(delta);
            DoFade(delta);
            if (letterboxAmount > 0)
            {
                var pct = Cutscene.LETTERBOX_HEIGHT * (float)letterboxAmount;
                int h   = (int)(Game.Height * pct);
                Game.RenderContext.Renderer2D.FillRectangle(new Rectangle(0, 0, Game.Width, h), Color4.Black);
                Game.RenderContext.Renderer2D.FillRectangle(new Rectangle(0, Game.Height - h, Game.Width, h), Color4.Black);
            }
            if (animatingLetterbox)
            {
                letterboxAmount -= delta * 3;
                if (letterboxAmount < 0)
                {
                    letterboxAmount    = -1;
                    animatingLetterbox = false;
                    ui.Visible         = true;
                }
            }
            Game.Debug.Draw(delta, () =>
            {
                ImGui.Text($"Room: {currentRoom.Nickname}");
                ImGui.Text($"Virtual: {virtualRoom ?? "NONE"}");
            });

            if (ui.Visible || ui.HasModal)
            {
                if (GetHotspot(Game.Mouse.X, Game.Mouse.Y) != null)
                {
                    talk_story.Draw(Game.RenderContext.Renderer2D, Game.Mouse, Game.TotalTime);
                }
                else
                {
                    cursor.Draw(Game.RenderContext.Renderer2D, Game.Mouse, Game.TotalTime);
                }
            }
        }
Esempio n. 4
0
 public override void Draw(TimeSpan delta)
 {
     //Make sure delta time is normal
     if (dframes == 0)
     {
         dframes = 1;
         return;
     }
     //TODO: Draw background THN
     scene.Draw();
     //UI Background
     Game.Renderer2D.Start(Game.Width, Game.Height);
     Game.Renderer2D.DrawImageStretched(logoOverlay, new Rectangle(0, 0, Game.Width, Game.Height), Color4.White, true);
     Game.Renderer2D.Finish();
     //buttons
     manager.Draw();
     //Cursor
     Game.Renderer2D.Start(Game.Width, Game.Height);
     cur.Draw(Game.Renderer2D, Game.Mouse);
     Game.Renderer2D.Finish();
 }