public DialogScreen(ScreenComponent manager, Item speaker, Player player, Dialog entry) : base(manager) { this.speaker = speaker; this.player = player; current = entry; Controls.Add(new Icon(manager) { Position = new Rectangle(10, 10, 24, 24), Texture = speaker.Icon }); Controls.Add(message = new Label(manager) { Position = new Rectangle(40, 10, manager.GraphicsDevice.Viewport.Width - 50, 30) }); Controls.Add(list = new DialogList(manager) { }); list.OnInteract += OnInteract; Refill(); }
public ClientScreen(ScreenComponent manager) : base(manager, new Point(400, 360)) { Controls.Add(new Panel(manager) { Position = new Rectangle(20, 20, 360, 40) }); Controls.Add(new Label(manager) { Text = "Verbinden", Position = new Rectangle(40, 30, 0, 0) }); Controls.Add(new LoadingIcon(manager) { Position = new Rectangle(330, 30, 32, 24) }); Controls.Add(status = new Label(manager) { Position = new Rectangle(40, 80, 0, 0) }); DialogButtons buttons = new DialogButtons(manager) { Position = new Rectangle(20, 300 - 70, 360, 50) }; buttons.Items.Add(cancelItem); Controls.Add(buttons); buttons.SelectedItem = cancelItem; buttons.OnInteract += OnInteract; }