public MapTooltip(IContext context, GameScreen gameScreen) : base(context, "map_tooltip", new UniRectangle()) { _gameScreen = gameScreen; _rectangle = new TexturedExtensibleRectangle(context, new Vector2I(), context.TextureManager.Create("tooltip.png", "Data/UI/"), 8); LabelStyle style = Context.UiManager.StyleManager.GetStyle(this); _text = Context.TextManager.Create(style.Font, style.FontSize, "", new Vector2I(400, 600), style.TextColor, style.HorizontalAlignment, style.VerticalAlignment, style.Padding); _delay = .5f; }
public Tooltip(IContext context, string id, Control associatedControl, double delay, string text = null) : base(context, id, new UniRectangle()) { _associatedControl = associatedControl; _text = context.TextManager.Create("Courrier", 14, "", new Vector2I(400, 500), Color.Wheat, HorizontalAlignment.Left, VerticalAlignment.Top, new Padding(8)); if(text != null) _text.Content = text; Texture texture = Context.TextureManager.Create("tooltip.png", @"Data/UI/"); _rectangle = new TexturedExtensibleRectangle(Context, new Vector2I(), texture, 8); _delay = delay; Visible = false; }
public Tooltip(IContext context, string id, Control associatedControl, double delay, string text = null) : base(context, id, new UniRectangle()) { _associatedControl = associatedControl; _text = context.TextManager.Create("Courrier", 14, "", new Vector2I(400, 500), Color.Wheat, HorizontalAlignment.Left, VerticalAlignment.Top, new Padding(8)); if (text != null) { _text.Content = text; } Texture texture = Context.TextureManager.Create("tooltip.png", @"Data/UI/"); _rectangle = new TexturedExtensibleRectangle(Context, new Vector2I(), texture, 8); _delay = delay; Visible = false; }
public override void Initialize() { _fixedPart = new TexturedExtensibleRectangle(Context, new Vector2I(Width, Size.Y), _fixedTexture, Width); _movingPart = new TexturedExtensibleRectangle(Context, new Vector2I(Width, 160), _movingTexture, 3); }