Exemple #1
0
        public override void Render(SpriteBatch b, int x, int y)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), x, y, Width, Height);

            Render2DUtils.DrawButton(b, x, y, Width, Height, Hovered ? Color.Wheat : Color.White);
            FontUtils.DrawHvCentered(b, $"{Title}:({Min}-{Max}){Current}", x + Width / 2, y + Height / 2);
        }
Exemple #2
0
        public override void Render(SpriteBatch b)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), X, Y, Width, Height);

            Render2DUtils.DrawButton(b, X, Y, Width, Height, Hovered ? Color.Wheat : Color.White);
            FontUtils.DrawHvCentered(b, Title, X + Width / 2, Y + Height / 2);
        }
Exemple #3
0
        public override void Render(SpriteBatch b, int x, int y)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), x, y, Width, Height);

            Render2DUtils.DrawButton(b, x, y, Width, Height, Hovered ? Color.Wheat : Color.White);
            FontUtils.DrawHvCentered(b, Title, x + Width / 2, y + Height / 2);
            if (!(Npc is Pet || Npc is Horse))
            {
                new ClickableTextureComponent("Mugshot", new Rectangle(x, y, Height, Height), "", "", Npc.Sprite.Texture,
                                              Npc.getMugShotSourceRect(), 0.7f * Game1.pixelZoom).draw(b);
            }
        }
Exemple #4
0
        public override void Render(SpriteBatch b, int x, int y)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), x, y, Width, Height);
            Render2DUtils.DrawButton(b, x, y, Width, Height, Color.Wheat);
            if (Hovered)
            {
                IClickableMenu.drawTextureBox(b, Game1.mouseCursors, new Rectangle(375, 357, 3, 3), x, y, Width, Height,
                                              Color.Black, 4f, false);
            }

            FontUtils.DrawHvCentered(b, Title, x + Width / 2, y + Height / 2);
        }
Exemple #5
0
        public override void Render(SpriteBatch b)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), X, Y, Width, Height);

            Render2DUtils.DrawButton(b, X, Y, Width, Height, Hovered ? Color.Wheat : Color.White);
            FontUtils.DrawHvCentered(b, Title, X + Width / 2, Y + Height / 2);

            if (Hovered)
            {
                IClickableMenu.drawTextureBox(b, Game1.mouseCursors, new Rectangle(375, 357, 3, 3), X, Y, Width, Height,
                                              Color.Red, 4f, false);
            }
        }
        public override void Render(SpriteBatch b, int x, int y)
        {
            Hovered = Render2DUtils.IsHovered(Game1.getMouseX(), Game1.getMouseY(), x, y, Width, Height);

            Color color;

            if (Toggled)
            {
                color = Color.Green;
            }
            else
            {
                color = Color.Red;
            }

            if (Hovered)
            {
                color = Color.Wheat;
            }

            Render2DUtils.DrawButton(b, x, y, Width, Height, color);
            FontUtils.DrawHvCentered(b, Title, x + Width / 2, y + Height / 2);
        }