1. Hi, what's the most efficient way to draw a button with a font?

    Currently I'm creating buttons like this because I can't get the Text work with CuiButton.

    Background Panel
    Text
    Invisible Button

    So i create 3 Elements in that ElementContainer.

    So my question is, is there a Way to draw a button with a text (including outline text) more efficient that I do?
     
  2. Why not just change the button text? As a button does have a predefined text it sticks in the middle or wherever your textanchor is.
    Code:
                        static public void CreateLabel(ref CuiElementContainer container, string panel, string color, string text, int size, string aMin, string aMax, TextAnchor align = TextAnchor.MiddleCenter)
                        {
                            container.Add(new CuiLabel
                            {
                                Text = { Color = color, FontSize = size, Align = align, Text = text },
                                RectTransform = { AnchorMin = aMin, AnchorMax = aMax }
                            },
                            panel);                    }
    [DOUBLEPOST=1488248092][/DOUBLEPOST]If you wanted to add font or whatever I would add it within the CreateLabel. Example: "<color=red><size=50>Text Here</size></color>"
     
  3. Sorry, i meant a normal Label, not Font.

    With my method the Button animation gets lost because it's a invisible button ontop of a Label and I'm trying to combine both to 1 single element.