Пример #1
1
        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();
        }
Пример #2
0
        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();
        }
Пример #3
0
        public FullscreeModeController( GUILauncher launcher )
            : base(launcher)
        {
            hBox = new HBox();
            Add(hBox);

            fBtn = new CheckButton("Mode plein écran");
            fBtn.Toggled += this.OnToggle;
            hBox.Add(fBtn);
        }
Пример #4
0
 public Controller( GUILauncher launcher )
 {
     myGUILauncher = launcher;
     ClientEvent += this.OnClientEvent;
 }