public override void UpdateLayout(GuiManager guiManager, Rectangle availableSize) { HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Center; Margin = new Thickness(4, 0, 0, 0); Width = 300; Height = 40; guiManager.Arrange(this, availableSize); positionTitle = new Vector2(Position.X, Position.Y); }
public override void UpdateLayout(GuiManager guiManager, Rectangle availableSize) { HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Bottom; Margin = new Thickness(16, 0, 0, 16); Width = 204; Height = 38; guiManager.Arrange(this, availableSize); positionAmount = new Vector2(Position.X + 7, Position.Y); positionTitle = new Vector2(Position.X + 83, Position.Y + 4); positionProgressBar = new Vector2(Position.X + 83, Position.Y + 17); UpdateProgressBar(); }
public override void UpdateLayout(GuiManager guiManager, Rectangle availableSize) { HorizontalAlignment = HorizontalAlignment.Right; VerticalAlignment = VerticalAlignment.Bottom; Margin = new Thickness(0, 0, 16, 16); Width = 204; Height = 38; guiManager.Arrange(this, availableSize); int titleWidth = (int)context.Resources.Fonts["Hud.Small"].MeasureString("Health").X; positionAmount = new Vector2(Position.X + 128, Position.Y); positionTitle = new Vector2(Position.X + 123 - titleWidth, Position.Y + 4); positionProgressBar = new Vector2(Position.X + 5, Position.Y + 17); UpdateProgressBar(); }
public override void UpdateLayout(GuiManager guiManager, Rectangle availableSize) { HorizontalAlignment = HorizontalAlignment.Right; VerticalAlignment = VerticalAlignment.Top; Margin = new Thickness(0, 15, 15, 0); Width = radarBaseImage.Width; Height = radarBaseImage.Height; guiManager.Arrange(this, availableSize); uiCenter = new Vector2(Position.X + (Width / 2), Position.Y + (Height / 2)); uiCenterForRadarCompass = uiCenter; uiCenter -= new Vector2((radarEntityImage.Width / 2.0f), (radarEntityImage.Height / 2.0f)); radarCompassOrigin = new Vector2((radarCompass.Width / 2), (radarCompass.Height / 2)); }