1. \t is can't ?

    Code:
    var Test = elements.Add(new CuiPanel
    {
        Image =
        {
            Color = "0.0 0.0 0.0 0"
        },
        RectTransform =
        {
            AnchorMin = "0.01 0.85",
            AnchorMax = "0.3 0.96"
        },
        CursorEnabled = false
        }, "Overlay", "TEST");    elements.Add(new CuiLabel
        {
            Text =
            {
                Text = "TEST1 \t TEST1\nTEST2 \t TEST2",
                FontSize = 15,
            },
            RectTransform =
            {
                AnchorMin = "0 0",
                AnchorMax = "1 1"
            }
        }, Test);    CuiHelper.AddUi(player, elements);
    }
    K-20161218-077316.png
     
    Last edited by a moderator: Dec 17, 2016
  2. Wulf

    Wulf Community Admin

    Why would you want to use \t? Perhaps you mean \n?
     
  3. Instead of adding multiple spaces to format horizontally?
     
  4. Wulf

    Wulf Community Admin

    Lots and lots of spaces.
     
  5. If you don't like how the tons of spaces look in your code you could create a constant string that is (for example) 10 spaces, and then just concatenate it whenever you need the spaces :). Or format your strings with a arg that is 10 spaces.
     
  6. Tabs are not supported by the CUI. You will just have to use spaces (as Wulf suggested), a constant string of spaces (as Eintime suggested) or if you need a variable amount of spaces you could write a method 'string Spaces(int amount)' or something. And if you only plan to display data in columns you could also consider using multiple CUI labels setup next to each other.