public override void Initialize() { ShouldBeScaled = false; Layer = 990; bback = new Elements.EncyclopediaBrowserButton(20, 440, 80, 30, "Back"); (bback as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bback.foreground = Color.White; //bback.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bback.onClicked += new Elements.Button.ClickedEventHandler(backClick); controls.Add(bback); bref = new Elements.EncyclopediaBrowserButton(500, 440, 80, 30, "Refresh"); (bref as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bref.foreground = Color.White; //bref.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bref.onClicked += new Elements.Button.ClickedEventHandler(refClick); controls.Add(bref); bdelete = new Elements.EncyclopediaBrowserButton(600, 440, 80, 30, "Delete"); (bdelete as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bdelete.foreground = Color.White; //bdelete.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bdelete.onClicked += new Elements.Button.ClickedEventHandler(deleteClick); controls.Add(bdelete); bsave = new Elements.EncyclopediaBrowserButton(700, 440, 80, 30, "Save"); (bsave as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bsave.foreground = Color.White; //bsave.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bsave.onClicked += new Elements.Button.ClickedEventHandler(saveClick); controls.Add(bsave); saves = new Elements.ListBox(10, 20, 780, 370); saves.onDoubleClicked += new Elements.ListBox.DoubleClickedEventHandler(saves_onDoubleClicked); saves.onSelectedIndexChanged += new Elements.ListBox.SelectedIndexChangedEventHandler(saves_onSelectedIndexChanged); controls.Add(saves); tb = new Elements.TextBox(10, 400, 780, 30, ""); tb.onTextChanged += new Elements.TextBox.TextChangedEventHandler(tb_onTextChanged); tb.BackgroundColor = Color.Black; tb.ForegroundColor = Color.White; tb.CursorColor = Color.White; tb.Multiline = false; controls.Add(tb); base.Initialize(); background = GUIEngine.s_mainMenu.background; }
public override void Initialize() { ShouldBeScaled = false; saves = new Elements.ListBox(10, 20, 780, 410); saves.onDoubleClicked += new Elements.ListBox.DoubleClickedEventHandler(saves_onDoubleClicked); controls.Add(saves); bback = new Elements.EncyclopediaBrowserButton(20, 440, 80, 30, "Back"); (bback as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bback.foreground = Color.White; //bback.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bback.onClicked += new Elements.Button.ClickedEventHandler(backClick); controls.Add(bback); bref = new Elements.EncyclopediaBrowserButton(500, 440, 80, 30, "Refresh"); (bref as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bref.foreground = Color.White; //bref.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bref.onClicked += new Elements.Button.ClickedEventHandler(refClick); controls.Add(bref); bdelete = new Elements.EncyclopediaBrowserButton(600, 440, 80, 30, "Delete"); (bdelete as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bdelete.foreground = Color.White; //bdelete.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bdelete.onClicked += new Elements.Button.ClickedEventHandler(deleteClick); controls.Add(bdelete); bload = new Elements.EncyclopediaBrowserButton(700, 440, 80, 30, "Load"); (bload as Elements.EncyclopediaBrowserButton).OverrideTexture("GUI/Menus/ButtonBackground2"); bload.foreground = Color.White; //bload.font = ResourceManager.Load<SpriteFont>("Fonts/MenuFont"); bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick); controls.Add(bload); base.Initialize(); background = GUIEngine.s_mainMenu.background; }
public override void Initialize() { ShouldBeScaled = false; ButtonsCount = FrameButtonsCount.Two; saves = new Elements.ListBox((int)Position.X, (int)Position.Y, (int)Size.X, (int)Size.Y - 35); saves.onDoubleClicked += new Elements.ListBox.DoubleClickedEventHandler(saves_onDoubleClicked); controls.Add(saves); bdelete = new Elements.MenuButton((int)(Position.X + Size.X) - 240, (int)(Position.Y + Size.Y) - 23, 120, 23, "Delete"); bdelete.Font = ButtonFont; bdelete.onClicked += new Elements.Button.ClickedEventHandler(deleteClick); controls.Add(bdelete); bload = new Elements.MenuButton((int)(Position.X + Size.X) - 120, (int)(Position.Y + Size.Y) - 23, 120, 23, "Load"); bload.Font = ButtonFont; bload.onClicked += new Elements.Button.ClickedEventHandler(loadClick); controls.Add(bload); base.Initialize(); }