public MainMenu() { //Increase the size so we can fit the character model into the menu var screenSize = GUCView.GetScreenSize(); int width = 900; int height = 600; int posX = (screenSize.X - width) / 2; int posY = (screenSize.Y - height) / 2; Back.SetPos(posX, posY); Back.SetSize(width, height); AddButton("Welt betreten", "Die Spielwelt mit dem gewählten Character betreten.", 50, () => JoinGameSelected?.Invoke(this)); AddButton("Charakter wählen", "Wähle deinen Spielcharakter.", 100, () => CharacterSelectionSelected?.Invoke(this)); AddButton("Charakter erstellen", "Erstelle einen Spielcharakter", 150, () => CharacterCreationSelected?.Invoke(this)); AddButton("Logout", "Zurück zum Login Menü", 200, () => BackToLoginSelected?.Invoke(this)); AddButton("Spiel verlassen", "Das Spiel schließen.", 250, () => ExitGameSelected?.Invoke(this)); _Character = AddCharacter("", 400, 0, 533, 400); _Character.SetVisual("HUMANS.MDS"); _Character.SetAdditionalVisuals(HumBodyMeshs.HUM_BODY_BABE0.ToString(), (int)HumBodyTexs.G1Hero, HumHeadMeshs.HUM_HEAD_BABE.ToString(), (int)HumHeadTexs.FaceBabe_B_RedLocks); _Character.Enabled = false; _Character.Hide(); _CharacterNameText = Back.CreateText("PlayerName", 650, 475); _CharacterNameText.Hide(); }
public CharacterSelectionMenu() { Back.CreateTextCenterX("Charakterauswahl", 10); _CharacterButtons = new MainMenuButton[5]; for (int i = 0; i < _CharacterButtons.Length; i++) { _CharacterButtons[i] = AddButton("...", "", _DistanceBetweenButtons * (i + 1), OnActivate); _CharacterButtons[i].Enabled = false; } //Increase the size so we can fit the character model into the menu var screenSize = GUCView.GetScreenSize(); int width = 900; int height = 600; int posX = (screenSize.X - width) / 2; int posY = (screenSize.Y - height) / 2; Back.SetPos(posX, posY); Back.SetSize(width, height); _CharacterDisplay = AddCharacter("", 400, 0, 533, 400); _CharacterDisplay.SetVisual("HUMANS.MDS"); _CharacterDisplay.SetAdditionalVisuals(HumBodyMeshs.HUM_BODY_BABE0.ToString(), (int)HumBodyTexs.G1Hero, HumHeadMeshs.HUM_HEAD_BABE.ToString(), (int)HumHeadTexs.FaceBabe_B_RedLocks); _CharacterDisplay.Enabled = false; _CharacterDisplay.Hide(); _CharacterNameText = Back.CreateText("PlayerName", 650, 475); _CharacterNameText.Hide(); CursorChanged += OnCursorChanged; }