private void SetupCloseButton() { _closeButton.Setup("Close Button", 0.0f, 30.0f, 0, true); _closeButton.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical); _closeButton.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_CLOSE)); _closeButton.EventButtonClicked += OnCloseClicked; }
private void CreateLoadButton() { _loadButtonPanel = _selectMixPanel.AddUIComponent <ButtonPanel>(); _loadButtonPanel.Setup("Load Button", 340.0f, 30.0f); _loadButtonPanel.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical); _loadButtonPanel.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_LOAD)); _loadButtonPanel.AlignRight(); _loadButtonPanel.EventButtonClicked += OnLoadClicked; }
private void CreateSaveButton() { _saveButtonPanel = _saveMixPanel.AddUIComponent <ButtonPanel>(); _saveButtonPanel.Setup("Save Button", 340.0f, 30.0f); _saveButtonPanel.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical); _saveButtonPanel.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_SAVE)); _saveButtonPanel.AlignRight(); _saveButtonPanel.DisableButton(); _saveButtonPanel.EventButtonClicked += OnSaveClicked; }
private void CreateSubscribeButton() { _subscribeButtonPanel = _selectMixPanel.AddUIComponent <ButtonPanel>(); _subscribeButtonPanel.Setup("Download Button", 340.0f, 30.0f); _subscribeButtonPanel.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical); _subscribeButtonPanel.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_SUBSCRIBE), Translation.Instance.GetTranslation(TranslationID.TOOLTIP_BUTTON_SUBSCRIBE)); _subscribeButtonPanel.AlignRight(); _subscribeButtonPanel.EventButtonClicked += OnSubscribeClicked; _subscribeButtonPanel.isVisible = false; }
private void SetupSaveButton() { _saveButton.Setup("Save Button", 0.0f, 30.0f, 0, true); _saveButton.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical); _saveButton.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_SAVE)); _saveButton.EventButtonClicked += OnSaveClicked; if (_savedSwatches.Count == MaxSavedSwatches) { _saveButton.Disable(); } }