Пример #1
0
        /// <summary>
        /// Initialises a new instance of the <see cref="HealthBar"/> class.
        /// </summary>
        public HealthBar(int id, int width, int height, IPositionProfile positionProfile, DrawLayer drawLayer, Unit unit)
            : base(id, width, height, positionProfile, drawLayer)
        {
            this.Unit = unit;

            BuildComponents();
        }
Пример #2
0
 /// <summary>
 /// Initialises a new instance of the <see cref="UIComponent"/> class.
 /// </summary>
 public UIComponent(int id, int width, int height, IPositionProfile positionProfile, DrawLayer drawLayer)
     : base(positionProfile, drawLayer)
 {
     this.Id      = id;
     this.Width   = width;
     this.Height  = height;
     this.Visible = true;
 }
Пример #3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="Frame"/> class.
 /// </summary>
 public Frame(int width, int height, IPositionProfile positionProfile, DrawLayer drawLayer, Color colour)
     : base(positionProfile, drawLayer)
 {
     this.Width      = width;
     this.Height     = height;
     this.Colour     = colour;
     this.Components = new List <BasicUIComponent>();
 }
Пример #4
0
 /// <summary>
 /// Initialises a new instance of the <see cref="FontGraphics"/> class.
 /// </summary>
 public FontGraphics(string text, int maxWidth, IPositionProfile positionProfile, DrawLayer drawLayer, TextFormat fontFlow, Color colour, SpriteFont font)
     : base(positionProfile, drawLayer)
 {
     this.text        = text;
     this.displayText = text;
     this.maxWidth    = maxWidth;
     this.fontFlow    = fontFlow;
     this.colour      = colour;
     this.font        = font;
     this.scale       = 1;
 }
Пример #5
0
 /// <summary>
 /// Initialises a new instance of the <see cref="Button"/> class.
 /// </summary>
 public Button(
     int id,
     int width,
     int height,
     string text,
     IPositionProfile positionProfile,
     DrawLayer drawLayer,
     Color defaultBackgroundColour,
     Color defaultTextColour,
     Color hoverBackgroundColour,
     Color hoverTextColour)
     : base(id, width, height, positionProfile, drawLayer)
 {
     this.text = text;
     BuildComponents(defaultBackgroundColour, defaultTextColour, hoverBackgroundColour, hoverTextColour);
 }
Пример #6
0
 /// <summary>
 /// Initialises a new instance of the <see cref="Profile"/> class.
 /// </summary>
 public Profile(int id, IPositionProfile positionProfile, DrawLayer drawLayer)
     : base(id, ProfileWidth, ProfileHeight, positionProfile, drawLayer)
 {
     Hide();
 }
Пример #7
0
 /// <summary>
 /// Initialises a new instance of the <see cref="ImageGraphics"/> class.
 /// </summary>
 public ImageGraphics(Texture2D image, IPositionProfile positionProfile, DrawLayer drawLayer)
     : base(positionProfile, drawLayer)
 {
     this.image = image;
 }
Пример #8
0
 /// <summary>
 /// Initialises a new instance of the <see cref="BasicUIComponent"/> class.
 /// </summary>
 public BasicUIComponent(IPositionProfile positionProfile, DrawLayer drawLayer)
 {
     this.PositionProfile = positionProfile;
     this.DrawLayer       = drawLayer;
 }