Esempio n. 1
0
 public void RenderNormalDialog(float x, float y, Vector4 color)
 {
     GL.DepthFunc(DepthFunction.Always);
     OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, color, x - 16, y - 16, Writer.Width + 32, Writer.Height + 32);
     OrthoRenderEngine.DrawTexturedBox(Writer.GetTextureID(), x, y, Writer.Width, Writer.Height);
     GL.DepthFunc(DepthFunction.Lequal);
 }
Esempio n. 2
0
        public void Render()
        {
            if (Time.CurrentTime() > time)
            {
                return;
            }

            GL.DepthFunc(DepthFunction.Always);
            OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.LightRed60, x - 16, y - 16, Writer.Width + 32, Writer.Height + 32);
            OrthoRenderEngine.DrawTexturedBox(Writer.GetTextureID(), x, y, Writer.Width, Writer.Height);
            GL.DepthFunc(DepthFunction.Lequal);
        }
Esempio n. 3
0
 public void RenderItemTooltip(Item i, float x, float y)
 {
     if (i != currentItem)
     {
         i.DrawTooltip(Writer);
     }
     x -= Writer.Width;
     y -= Writer.Height / 2;
     GL.DepthFunc(DepthFunction.Always);
     OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.White60, x - 16, y - 16, Writer.Width + 32, Writer.Height + 32);
     OrthoRenderEngine.DrawTexturedBox(Writer.GetTextureID(), x, y, Writer.Width, Writer.Height);
     GL.DepthFunc(DepthFunction.Lequal);
     currentItem = i;
 }
Esempio n. 4
0
        public void RenderView(Matrix4 VP, Scene s)
        {
            blade.RenderBlade(VP, Pos.X, Pos.Y - (diamond < 0?-0.6f:blade.Type.Points[diamond] * blade.Type.MeshScale), height, Util.PI / 2, heat, GetEyePos());

            BasicShader shader = BasicShader.Instance;

            shader.Bind();
            Matrix4 modelspace = Matrix4.CreateTranslation(0, 1, 0) * Matrix4.CreateRotationX(-hammerMove) * Matrix4.CreateTranslation(0, 2.5f + hammerY * hammerMove / 4, 0) * Matrix4.CreateRotationX(0.9f - hammerMove) *
                                 Matrix4.CreateRotationZ(0.7f + hammerX * hammerMove / 4) * Matrix4.CreateTranslation(1.9f, -2.4f, height + 1) * Modelspace;

            shader.SetMVP(modelspace * VP);
            shader.SetModelspaceMatrix(modelspace);
            shader.ResetColor();
            hammer.Draw();

            OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.White, 50, 50, 250, 250);
            OrthoRenderEngine.DrawColoredMesh(table.Mesh, projection, Util.White, 50, 50, 250, 250);
            OrthoRenderEngine.DrawColoredMesh(table.Coal, projection, Util.White, 50, 50, 250, 250);
        }
Esempio n. 5
0
 public void RenderView(Matrix4 VP, Scene s)
 {
     blade.RenderBlade(VP, Pos.X + (diamond < 0?-0.6f:blade.Type.Points[diamond] * blade.Type.MeshScale), Pos.Y, height, Util.PI, heat, GetEyePos());
     OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.White, OrthoRenderEngine.GetCanvasWidth() - 300, 50, 250, 250);
     OrthoRenderEngine.DrawColoredMesh(anvil.Mesh, projection, Util.White, OrthoRenderEngine.GetCanvasWidth() - 300, 50, 250, 250);
 }