public SdkLocationWidget(SdkLocationPanel panel) : base(false, 12)
        {
            this.panel = panel;

            this.PackStart(new Label()
            {
                Markup = "<b>" + GLib.Markup.EscapeText(panel.Label) + "</b>",
                Xalign = 0f,
            });
            var alignment = new Alignment(0f, 0f, 1f, 1f)
            {
                LeftPadding = 24
            };

            this.PackStart(alignment);
            var vbox        = new VBox(false, 6);
            var locationBox = new HBox(false, 6);
            var messageBox  = new HBox(false, 6);

            alignment.Add(vbox);
            vbox.PackStart(messageBox, false, false, 0);
            vbox.PackStart(locationBox, false, false, 0);
            locationBox.PackStart(new Label(GettextCatalog.GetString("Location:")), false, false, 0);
            locationBox.PackStart(locationEntry, true, true, 0);
            messageBox.PackStart(messageIcon, false, false, 0);
            messageBox.PackStart(messageLabel, true, true, 0);
            messageLabel.Xalign = 0f;

            string location = panel.LoadSdkLocationSetting();

            locationEntry.Path = location ?? "";

            locationEntry.PathChanged += delegate {
                Validate();
            };
            Validate();

            if (panel.RequiresRestart)
            {
                PackStart(new HSeparator(), false, false, 0);

                var tableRestart = new RestartPanel();
                tableRestart.RestartRequested += (sender, e) => {
                    ApplyChanges();
                    IdeApp.Restart(true).Ignore();
                };

                PackStart(tableRestart, false, false, 0);
            }

            ShowAll();
        }
Exemple #2
0
 void OnGameStarted()
 {
     StartPanel.SetActive(false);
     RestartPanel.SetActive(false);
 }
Exemple #3
0
 void OnGameEnded()
 {
     RestartPanel.SetActive(true);
 }
Exemple #4
0
 public void ShowRestartMenu()
 {
     CloseWindows();
     RestartPanel.SetActive(true);
 }
Exemple #5
0
 public void CloseWindows()
 {
     SettingsPanel.SetActive(false);
     RestartPanel.SetActive(false);
 }
Exemple #6
0
 void OnGameOver()
 {
     RestartPanel.SetActive(true);
 }