private void SetupButtons()
        {
            toggleEditButton                 = UIUtilities.CreateSmallButton(this, Translation.Instance.GetTranslation("FOREST-BRUSH-TOGGLE-EDIT"));
            toggleEditButton.zOrder          = 1;
            toggleEditButton.atlas           = ResourceLoader.ForestBrushAtlas;
            toggleEditButton.normalBgSprite  = ResourceLoader.SettingsDropboxFocused;
            toggleEditButton.hoveredBgSprite = ResourceLoader.SettingsDropboxHovered;
            toggleEditButton.focusedBgSprite = ResourceLoader.SettingsDropboxFocused;
            toggleEditButton.pressedBgSprite = ResourceLoader.SettingsDropboxPressed;
            toggleEditButton.eventClicked   += ToggleEditButton_eventClicked;

            toggleOptionsButton                 = UIUtilities.CreateSmallButton(this, Translation.Instance.GetTranslation("FOREST-BRUSH-TOGGLE-OPTIONS"));
            toggleOptionsButton.zOrder          = 2;
            toggleOptionsButton.atlas           = ResourceLoader.ForestBrushAtlas;
            toggleOptionsButton.normalBgSprite  = ResourceLoader.OptionsDropboxFocused;
            toggleOptionsButton.hoveredBgSprite = ResourceLoader.OptionsDropboxHovered;
            toggleOptionsButton.focusedBgSprite = ResourceLoader.OptionsDropboxFocused;
            toggleOptionsButton.pressedBgSprite = ResourceLoader.OptionsDropboxPressed;
            toggleOptionsButton.eventClicked   += ToggleOptionsButton_eventClicked;

            selectBitmapButton                  = UIUtilities.CreateSmallButton(this, Translation.Instance.GetTranslation("FOREST-BRUSH-TOGGLE-SELECTBRUSHSHAPE"));
            selectBitmapButton.size             = new Vector2(30.0f, 30.0f);
            selectBitmapButton.relativePosition = new Vector2(10.0f, 0.0f);
            selectBitmapButton.zOrder           = 3;
            selectBitmapButton.eventClicked    += SelectBitmapButton_eventClicked;
            selectBitmapButton.atlas            = ResourceLoader.ForestBrushAtlas;
            selectBitmapButton.normalBgSprite   = ResourceLoader.PaintBrushFocused;
            selectBitmapButton.hoveredBgSprite  = ResourceLoader.PaintBrushHovered;
            selectBitmapButton.focusedBgSprite  = ResourceLoader.PaintBrushFocused;
            selectBitmapButton.pressedBgSprite  = ResourceLoader.PaintBrushPressed;
        }
Exemple #2
0
        private void SetupButtons()
        {
            createBrushButton               = UIUtilities.CreateSmallButton(topPanel, Translation.Instance.GetTranslation("FOREST-BRUSH-CREATE"));
            createBrushButton.zOrder        = 1;
            createBrushButton.text          = "+";
            createBrushButton.eventClicked += CreateBrushButton_eventClicked;

            deleteBrushButton               = UIUtilities.CreateSmallButton(topPanel, Translation.Instance.GetTranslation("FOREST-BRUSH-DELETE"));
            deleteBrushButton.textPadding   = new RectOffset(0, 0, 0, 1);
            deleteBrushButton.zOrder        = 2;
            deleteBrushButton.text          = "-";
            deleteBrushButton.eventClicked += DeleteBrushButton_eventClicked;
        }