public void Redraw( IDrawer2D drawer, string text, Font font ) { if( !Active ) text = "&7" + Text; DrawTextArgs args = new DrawTextArgs( text, font, true ); Size size = drawer.MeasureSize( ref args ); int width = ButtonWidth, height = ButtonHeight; int xOffset = width - size.Width, yOffset = height - size.Height; if( Shadow ) drawer.DrawRoundedRect( Active ? shadowColActive : shadowCol, 3, X + IDrawer2D.Offset, Y + IDrawer2D.Offset, width, height ); drawer.DrawRoundedRect( Active ? boxColActive : boxCol, 3, X, Y, width, height ); args.SkipPartsCheck = true; drawer.DrawText( ref args, X + 1 + xOffset / 2, Y + 1 + yOffset / 2 ); }