Exemplo n.º 1
0
 private void CreateResetButton()
 {
     resetButton = buttonsPanel.AddUIComponent <ButtonPanel>();
     resetButton.Build(PanelType.None, new Layout(new Vector2(0.0f, 40.0f), true, LayoutDirection.Horizontal, LayoutStart.TopLeft, 0));
     resetButton.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical);
     resetButton.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_RESET));
     resetButton.EventButtonClicked += OnResetClicked;
 }
Exemplo n.º 2
0
 private void CreateSaveButton()
 {
     saveButton = buttonsPanel.AddUIComponent <ButtonPanel>();
     saveButton.Build(PanelType.None, new Layout(new Vector2(0.0f, 40.0f), true, LayoutDirection.Horizontal, LayoutStart.TopLeft, 0));
     saveButton.SetAnchor(UIAnchorStyle.Left | UIAnchorStyle.CenterVertical);
     saveButton.SetText(Translation.Instance.GetTranslation(TranslationID.BUTTON_SAVE));
     saveButton.EventButtonClicked += OnSaveClicked;
     if (savedSwatches.Count == MAX_SAVED_SWATCHES)
     {
         saveButton.Disable();
     }
 }