Skip to content

File NativeSeparatorItem.cs

File List > LemonUI > LemonUI > Menus > NativeSeparatorItem.cs

Go to the documentation of this file


#if FIVEM
using CitizenFX.Core.UI;
#elif RAGEMP
using RAGE.Game;
#elif SHVDN3 || SHVDNC
using GTA.UI;
#endif
using System.Drawing;

namespace LemonUI.Menus
{
    public class NativeSeparatorItem : NativeItem
    {
        #region Constructors

        public NativeSeparatorItem() : this(string.Empty)
        {
        }
        public NativeSeparatorItem(string title) : base(title, string.Empty, string.Empty)
        {
            this.title.Alignment = Alignment.Center;
        }

        #endregion

        #region Functions

        public override void Recalculate(PointF pos, SizeF size, bool selected)
        {
            base.Recalculate(pos, size, selected);

            title.Position = new PointF(pos.X + (size.Width * 0.5f), title.Position.Y);
        }
        public override void Draw()
        {
            title.Draw();
        }

        #endregion
    }
}