Beispiel #1
0
        internal override void Draw()
        {
            base.Draw();

            WWTexture background = null;

            if (isPressed)
            {
                background = backgroundClicked;
            }
            else
            {
                background = backgroundNotClicked;
            }

            if (background == null)
            {
                return;
            }

            Vector2 screenPos = ScreenPosition;

            Color col = Color.FromNonPremultiplied(new Vector4(Vector3.One, CompositeAlpha));

            background.RenderOnScreen(screenPos.X, screenPos.Y, Width, Height, col);

            colText.Render(screenPos.X, screenPos.Y, (float)Width, (float)Height, font, TextAlignHorizontal.Center, col, Color.Yellow);
        }
Beispiel #2
0
        } // Tile(data)

        /// <summary>
        /// Render
        /// </summary>
        internal void Render(float x, float y, float scale)
        {
            texture.RenderOnScreen(x * scale, y * scale, 16.0f * scale, 16.0f * scale);
            if (DebugOptions.ShowTiles)
            {
                WWTexture.RenderRectangle(new RectangleF(x * scale, y * scale, 16.0f * scale, 16.0f * scale), Color.Red);
            }
        } // Render(x, y)
Beispiel #3
0
        internal override void Draw()
        {
            base.Draw();

            Color col = Color.FromNonPremultiplied(new Vector4(Vector3.One, CompositeAlpha));

            backgroundImage.RenderOnScreen(0, 0, col);
        }
Beispiel #4
0
        internal override void Draw()
        {
            base.Draw();

            if (image != null)
            {
                Vector2 screenPos = ScreenPosition;

                image.RenderOnScreen(screenPos.X, screenPos.Y, Width, Height, Color.FromNonPremultiplied(new Vector4(Vector3.One, CompositeAlpha)));
            }
        }
Beispiel #5
0
        internal override void Draw()
        {
            base.Draw();

            if (Sprite == null)
            {
                return;
            }

            Vector2 screenPos = ScreenPosition;

            WWTexture image = Sprite.CurrentFrameTexture;

            if (image != null)
            {
                image.RenderOnScreen(screenPos.X, screenPos.Y, Width, Height);
            }
        }
Beispiel #6
0
        internal override void Draw()
        {
            base.Draw();

            minimapTex.RenderOnScreen(X, Y);
        }