System.Windows.Forms.BitmapLabel.OnPaintEditor C# (CSharp) Method

OnPaintEditor() protected method

protected OnPaintEditor ( float width ) : object
width float
return object
        protected override object OnPaintEditor(float width)
        {
            var control = base.OnPaintEditor(width);

            Editor.NewLine(1);

            var textBuffer = Editor.TextField("Text", Text);
            if (textBuffer.Changed)
            {
                _bakedTexture = null;
                Text = textBuffer;
            }

            Editor.Label("Baked", _bakedTexture != null);

            if (_bakedTexture == null)
            {
                var showRectsBuffer = Editor.BooleanField("ShowRects", ShowRects);
                if (showRectsBuffer.Changed)
                    ShowRects = showRectsBuffer.Value;
            }

            if (Editor.Button("Bake"))
                Bake();
            if (Editor.Button("ClearBake"))
                ClearBake();

            if (Editor.Button("Scale x0.5"))
                Scale = .5f;
            if (Editor.Button("Scale x1"))
                Scale = 1f;
            if (Editor.Button("Scale x2"))
                Scale = 2f;

            return control;
        }