public void Show() { CreateText(new JSONStorableString("", "Automatically configures optimal settings for the current person and the selected modules."), true); var startButton = CreateButton("Start Wizard", true); startButton.button.onClick.AddListener(() => _wizard.StartWizard()); var stopButton = CreateButton("Stop Wizard", true); stopButton.button.onClick.AddListener(() => _wizard.StopWizard("Stopped")); var statusText = CreateText(_wizard.statusJSON, true); statusText.height = 600; var nextButton = CreateButton("Next", true); nextButton.button.onClick.AddListener(() => _wizard.Next()); _onStatusChanged = isRunning => { startButton.button.interactable = !isRunning; stopButton.button.interactable = isRunning; nextButton.button.interactable = isRunning; }; _wizard.statusChanged.AddListener(_onStatusChanged); _onStatusChanged(_wizard.isRunning); }
public void Show() { CreateTitle("Experimental Features"); _experimentalViveTrackersToggle = CreateToggle(context.wizard.experimentalViveTrackersWizardJSON); _experimentalViveTrackersToggle.label = "Vive Trackers 2-Step Wizard"; _experimentalSnugToggle = CreateToggle(context.wizard.experimentalSnugWizardJSON); _experimentalSnugToggle.label = "Snug Wizard (Outside-In Headsets)"; var statusText = CreateText(_wizard.statusJSON, true); statusText.height = 980; var nextButton = CreateButton("Start Wizard >", true); nextButton.button.onClick.AddListener(() => { if (_wizard.isRunning) { _wizard.Next(); } else { _wizard.StartWizard(); } }); nextButton.buttonColor = Color.green; var skipButton = CreateButton("Skip Step >", true); skipButton.button.onClick.AddListener(() => _wizard.Skip()); skipButton.buttonColor = Color.gray; var stopButton = CreateButton("Stop Wizard", true); stopButton.button.onClick.AddListener(() => _wizard.StopWizard("The wizard was stopped.")); stopButton.buttonColor = Color.red; _onStatusChanged = isRunning => { nextButton.label = isRunning ? "Next (Press [A] Anywhere) >" : "Start Wizard >"; stopButton.button.interactable = isRunning; skipButton.button.interactable = isRunning; context.embody.activeToggle.toggle.interactable = !isRunning; _experimentalViveTrackersToggle.toggle.interactable = !isRunning; _experimentalSnugToggle.toggle.interactable = !isRunning; }; _wizard.statusChanged.AddListener(_onStatusChanged); _onStatusChanged(_wizard.isRunning); }