private void Start() { SceneManager.sceneUnloaded += SceneUnloaded; starsText.text = STARS_TEXT + mainMap.GetGameManager().User.LevelProgressManager.GetStarsAccumulated(); coinsText.text = COINS_TEXT + mainMap.GetGameManager().User.Currency; mainMap.GetGameManager().User.OnCurrencyChanged += CurrencyChangedHandler; _settingsPopup = FindObjectOfType <SettingsPopup>(); }
void Update() { if (Input.GetButtonDown("Pause") && !_settingsPopup) { _settingsPopup = Instantiate(settingsPopup); _settingsPopup.ShowToMenuButton(); } else if (Input.GetButtonDown("Pause") && _settingsPopup) { Destroy(_settingsPopup.gameObject); } }
public void DrawButton(Rect rect) { if (Value == null) { throw new InvalidOperationException("Can't draw: Settings object is null."); } if (GUI.Button(rect, "S")) { var context = new SettingsPopup(Value); PopupWindow.Show(rect, context); } }
public void OnHandwritingSettings() { var mypane = new HandwritingSettingsFlyout { Width = SettingsWidth, Height = WindowBounds.Height }; SettingsPopup.Child = mypane; SettingsPopup.SetValue(Canvas.LeftProperty, SettingsPane.Edge == SettingsEdgeLocation.Right ? (WindowBounds.Width - SettingsWidth) : 0); SettingsPopup.SetValue(Canvas.TopProperty, 0); SettingsPopup.IsOpen = true; }
public void OnEditAutocorrectorList() { var mypane = new EditAutoCorrectorListFlyout { Width = SettingsWidth, Height = WindowBounds.Height }; SettingsPopup.Child = mypane; SettingsPopup.SetValue(Canvas.LeftProperty, SettingsPane.Edge == SettingsEdgeLocation.Right ? (WindowBounds.Width - SettingsWidth) : 0); SettingsPopup.SetValue(Canvas.TopProperty, 0); SettingsPopup.IsOpen = true; }
void Awake() { _thisCanvas = GetComponent <Canvas> (); var panels = GetComponentsInChildren <HorizontalLayoutGroup>(); _skillsButtonPanel = panels.FirstOrDefault(i => i.tag == "LvlSkillPanel"); _availablesPanel = panels.FirstOrDefault(i => i.tag == "AvailablesPanel"); _minionSkillPanel = panels.FirstOrDefault(i => i.tag == "MinionSkillPanel"); //_dragAndDropSystem = GetComponentInChildren<DragAndDropSystem>(); //_timerBtn = GetComponentsInChildren<Button>().FirstOrDefault(i => i.tag == "BuildSquadTimer"); //_timerText = _timerBtn.GetComponentInChildren<Text>(); //_timerBtn.onClick.AddListener(() => OnTimerButtonClicked()); levelTimerFillBar.fillAmount = 1; //_levelLives = _levelLivesBG.GetComponentInChildren<Text>(); _settingsPopup = FindObjectOfType <SettingsPopup>(); _cameraMove = Camera.main.GetComponentInParent <CameraMovement> (); _initPointBarColor = levelPointBar.color; }
private void Awake() { loadingScreen.transform.parent.gameObject.SetActive(false); _settingsPopup = FindObjectOfType <SettingsPopup>(); }
void Awake() { Instance = this; base.Awake(); }
private void btnSettings_MouseUp(object sender, MouseButtonEventArgs e) { SettingsPopup.IsOpen = true; SettingsPopup.Focus(); }
private void Start() { _moneyRef = _money; _upgradePopupRef = _upgradePopup; _settingspopupRef = _settingsPopup; }
// Use this for initialization void Start() { Current = this; gameObject.SetActive(false); }
void showSettings() { GameObject parent = UICamera.first.transform.parent.gameObject; GameObject obj = NGUITools.AddChild(parent, settingsPrefab); SettingsPopup popup = obj.GetComponent <SettingsPopup>(); }