public PlayerScoreController(GUILauncher launcher) : base(launcher) { hBox = new HBox(); mySpinButtons = new List<SpinButton>(); GameState state = launcher.OurGameApp.GameState; for (int i = 0; i < state.NumPlayers; i++ ) { Label player = new Label("Score joueur " + (i+1).ToString() + ":"); hBox.Add(player); SpinButton playerSpinButton = new SpinButton(0, 9999999d, 1); mySpinButtons.Add(playerSpinButton); playerSpinButton.ValueChanged += this.OnPlayerScoreEntryChanged; playerSpinButton.Digits = 0; playerSpinButton.Numeric = true; playerSpinButton.Wrap = true; playerSpinButton.SnapToTicks = true; hBox.Add(playerSpinButton); } this.Add(hBox); this.ShowAll(); }
public ThemeSelectionController( GUILauncher guiLauncher ) : base(guiLauncher) { menuEntriesButtons = new List<Button>(); int numThemes = guiLauncher.OurGameApp.GameState.NumThemes; for (int i = 0; i < numThemes; i++ ) { Theme thm = guiLauncher.OurGameApp.GameState.GetTheme(i); Button btn = new Button(thm.Name); btn.Clicked += this.OnMenuButtonClicked; Add(btn); menuEntriesButtons.Add(btn); } startButton = new Button("Lancer"); startButton.Clicked += this.OnStartButtonClicked; startButton.Sensitive = false; Add(startButton); ShowAll(); // By default, nothing is sensitive DesactivateController(); }
public FullscreeModeController( GUILauncher launcher ) : base(launcher) { hBox = new HBox(); Add(hBox); fBtn = new CheckButton("Mode plein écran"); fBtn.Toggled += this.OnToggle; hBox.Add(fBtn); }
public Controller( GUILauncher launcher ) { myGUILauncher = launcher; ClientEvent += this.OnClientEvent; }