コード例 #1
0
        public override void Draw(SpriteBatch sb)
        {
            base.Draw(sb);

            incr.Position += Position + new Vector2(Hitbox.Width - decr.Hitbox.Width - 16f, 0f);
            incr.Draw(sb);
            incr.Position -= Position + new Vector2(Hitbox.Width - decr.Hitbox.Width - 16f, 0f);

            decr.Position += Position + new Vector2(Hitbox.Width - 8f, 0f);
            decr.Draw(sb);
            decr.Position -= Position + new Vector2(Hitbox.Width - 8f, 0f);
        }
コード例 #2
0
ファイル: Window.cs プロジェクト: jayands/tAPI-SDK
        public override void Draw(SpriteBatch sb)
        {
            // window border/bg
            DrawBackground(sb);

            sb.Draw(SdkUI.WhitePixel, new Vector2(2f, topBar.Y), null, new Color(18, 18, 38), Rotation, Origin, new Vector2(Scale.X - 4f, 2f), SpriteEffects, LayerDepth);

            // title
            sb.DrawString(Font, Text, Position + padding, Colour, Rotation, Origin, Scale, SpriteEffects, LayerDepth);

            // close button
            close.Position += Position;
            close.Draw(sb);
            close.Position -= Position;

            Position += topBar;
            base.Draw(sb);
            Position -= topBar;
        }