public DialogYN(Screen display) : base(display) { BackgroundImage = Content.Graphics.Instance.Images.background.bg_dialog; size = new Vector2(300, 150); pos = new Vector2(Game1.Instance.Window.ClientBounds.Width / 2 - size.X / 2, 100); lbl_txt = new Label(""); lbl_txt.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.NORM; lbl_txt.Position = new Vector2(pos.X + 50, pos.Y + 10); add(lbl_txt); lnk_yes = new Link("Yes"); lnk_yes.Position = new Vector2(pos.X + 50, pos.Y + 120); lnk_yes.selected = com; add(lnk_yes); lnk_no = new Link("No"); lnk_no.Position = new Vector2(pos.X + 200, pos.Y + 120); lnk_no.selected = com; add(lnk_no); FocusSideArrowEnabled = true; }
public DialogTxt(Screen display) : base(display) { BackgroundImage = Content.Graphics.Instance.Images.background.bg_dialog; size = new Vector2(300, 150); pos = new Vector2(Game1.Instance.Window.ClientBounds.Width / 2 - size.X / 2, 100); lbl_text = new Label(""); lbl_text.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.NORM; lbl_text.Position = new Vector2(pos.X + 50, pos.Y + 10); add(lbl_text); txt = new TextBox(15); txt.Position = new Vector2(pos.X + 50, pos.Y + 50); txt.HasFocus = true; add(txt); lnk_enter = new Link("Enter"); lnk_enter.Position = new Vector2(pos.X + 50, pos.Y + 100); lnk_enter.selected = sel; add(lnk_enter); }
public void goForward(Screen sc) { if (cstate.Count > 0) cstate.Peek().pause(); InputHandler.flush(); Game1.Instance.Components.Add(sc); cstate.Push(sc); sc.start(); }
public void changeCur(Screen sc) { goBack(); goForward(sc); }
public StateManager(Screen sc) { cstate = new Stack<Screen>(); goForward(sc); }
public void reset(Screen sc) { clear(); goForward(sc); }
public Window(Screen display) : base(Game1.Instance) { init(display, false); }
public Window(Screen display, bool mainWindow) : base(Game1.Instance) { init(display, mainWindow); }
private void init(Screen display, bool fismain) { parent = display; ismain = fismain; if (ismain) { pos = new Vector2(0, 0); size = new Vector2(Game1.Instance.Window.ClientBounds.Width, Game1.Instance.Window.ClientBounds.Height); } else { pos = new Vector2(10, 10); size = new Vector2(100, 100); } bg = Content.Graphics.Instance.Images.background.black; fm = new FocusManager(); hasFocus = false; }