public InfoPlayer(Screen parent, Vector2 position, Texture2D texture, Player player) : base(parent, position, texture) { actualPlayer = player; this.texture = texture; isMoving = false; }
protected override void LoadContent() { spriteBatch = new UberSpriteBatch(GraphicsDevice); // Charge notre spriteBatch personnalise TexturesManager.Load(Content); // Charge les textures cursor = new CursoManagers(TexturesManager.Cursor); RandomManager.Init(); currentScreen = new StartMenu(); }
public DialogWindow(Screen parent, Vector2 position, Texture2D texture) : base(parent, position, texture) { this.position = position; this.texture = texture; printNext = new Button(position + new Vector2(texture.Width - TexturesManager.Next.Width - 10, texture.Height - TexturesManager.Next.Height - 10), TexturesManager.Next); printNext.MouseClick += OnPrintNextGameMouseClick; }
public SoundProperties(Screen parent, Vector2 position, Texture2D texture) : base(parent, position, texture) { this.texture = texture; songSlide = new Button(position + new Vector2(TexturesManager.Window.Width / 2, TexturesManager.MovingCursor.Height + 5) - new Vector2(TexturesManager.MovingCursor.Width / 2, 0), TexturesManager.MovingCursor, TexturesManager.Window.Width); soundEffectSlide = new Button(position + new Vector2(TexturesManager.Window.Width / 2, TexturesManager.MovingCursor.Height + 5) - new Vector2(TexturesManager.MovingCursor.Width / 2, 0) + new Vector2(0,50), TexturesManager.MovingCursor, TexturesManager.Window.Width); songSlide.MouseClicking += onSongSlideClicking; soundEffectSlide.MouseClicking += onSoundEffectSlideClicking; }
public Panel(Screen parent, Vector2 position, Texture2D texture,Player player) : base(parent, position, texture) { infoPlayerWindow = new InfoPlayer(parent, new Vector2(MainGame.ScreenX - 200, 5), TexturesManager.Window ,player); spellListWindow = new SpellList(parent, new Vector2(MainGame.ScreenX - 500, 5), TexturesManager.Window, player); infoPlayerButton = new Button(position, TexturesManager.InfoButton); spellListButton = new Button(position + new Vector2(0, TexturesManager.SpellButton.Height), TexturesManager.SpellButton); infoPlayerButton.MouseClick += OnInfoPlayerMouseClick; spellListButton.MouseClick += OnSpellListMouseClick; }
public LocalClient(Screen parent, Vector2 position) : base(parent, position) { name = ""; Bounds = new Rectangle((int)position.X, (int)position.Y, MainGame.ScreenX / 2, MainGame.ScreenY / 2); box = new List<TextBox>(); box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Port :").X, Bounds.Y + 50), 6, 1, TexturesManager.Menu, Color.Blue, Color.Red)); box[0].IsSelect = true; box.Add(new TextBox(new Vector2(box[0].Bound.X + box[0].Bound.Width + 20 + TexturesManager.Menu.MeasureString("Nom :").X, box[0].Bound.Y), 20, 1, TexturesManager.Menu, Color.Blue, Color.Red)); box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Ip :").X, box[0].Bound.Bottom + 10),20,1,TexturesManager.Menu,Color.Blue,Color.Red)); joinButton = new Button(new Vector2(box[2].Bound.Right + 10, box[2].Bound.Y), "Rejoindre" ); joinButton.MouseClick += OnJoinMouseClick; }
public EscapeMenu(Screen parent, Vector2 position) : base(parent, position) { launchMainButton = new Button(new Vector2(position.X, position.Y + 50), Res.ReturnMainMenu); optionButton = new Button(new Vector2(position.X, position.Y + 100), Res.Options); suicideButton = new Button(new Vector2(position.X, position.Y + 150), Res.GiveUp); quitGameButton = new Button(new Vector2(position.X, position.Y + 200), Res.LeaveGame); launchMainButton.MouseClick += OnLaunchMainButtonMouseClick; optionButton.MouseClick += OnOptionButtonMouseClick; suicideButton.MouseClick += OnSuicideButtonMouseClick; quitGameButton.MouseClick += OnQuitGameMouseClick; }
public MultiLocalWindow(Screen parent, Vector2 position, Texture2D texture) : base(parent, position, texture) { this.parent = parent; Bounds = new Rectangle((int)Position.X, (int)Position.Y, MainGame.ScreenX / 8, MainGame.ScreenY / 8); this.texture = texture; Serveur = new Button(new Vector2(Bounds.X + Bounds.Width / 4, Bounds.Y + Bounds.Height / 4),"Serveur" ); Serveur.MouseClick += OnServeurMouseClick; localServeur = new LocalServeur(parent, new Vector2(Bounds.X + Bounds.Width + 10, Serveur.Bounds.Y)); Client = new Button(new Vector2(Bounds.X + Bounds.Width / 4, Bounds.Y + Bounds.Height / 2), "Client"); Client.MouseClick += OnClientMouseClick; localClient = new LocalClient(parent, new Vector2(Bounds.X + Bounds.Width + 10 , Client.Bounds.Y)); }
public LocalServeur(Screen parent, Vector2 position) : base(parent, position) { isCreate = false; name = ""; box = new List<TextBox>(); Bounds = new Rectangle((int) position.X, (int) position.Y, 2*MainGame.ScreenX/3, MainGame.ScreenY/2); StartButton = new Button(new Vector2(Bounds.X + Bounds.Width - TexturesManager.Menu.MeasureString("Lancer").X - 30, Bounds.Y + Bounds.Height - TexturesManager.Menu.MeasureString("Lancer").Y - 15), "Lancer"); createButton = new Button(new Vector2(Bounds.X + Bounds.Width - TexturesManager.Menu.MeasureString("Créer").X - 30, Bounds.Y + 50),"Créer"); createButton.MouseClick += OnCreateMouseClick; box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Port :").X, Bounds.Y + 50),6,1,TexturesManager.Menu,Color.Blue,Color.Red)); box[0].IsSelect = true; box.Add(new TextBox(new Vector2(box[0].Bound.X + box[0].Bound.Width + 20 + TexturesManager.Menu.MeasureString("Nom :").X,box[0].Bound.Y),20,1, TexturesManager.Menu, Color.Blue,Color.Red)); }
protected override void LoadContent() { spriteBatch = new UberSpriteBatch(GraphicsDevice); // Charge notre spriteBatch personnalise TexturesManager.Load(Content); // Charge les textures CursorManager.CurrentTexture = TexturesManager.Cursor; RandomManager.Init(); XactManager.Load(); currentScreen = new StartMenu(); XactManager.PlaySong("Menu01"); XactManager.Engine.GetCategory("Music").SetVolume(0.5f); XactManager.Engine.GetCategory("SoundEffect").SetVolume(0.5f); }
public void SetScreen(Screen screen) { currentScreen = screen; }
protected Window(Screen parent, Vector2 position, Texture2D texture) { Parent = parent; Position = position; Bounds = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height); }
protected Window(Screen parent, Vector2 position) { Parent = parent; Position = position; }
public KeyBinding(Screen parent, Vector2 position, Texture2D texture) : base(parent, position, texture) { }