1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. saki sakatome

    saki sakatome Naked Wanderer

    \t is can't ?

    Code (Text):
    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);
    Last edited: Dec 17, 2016
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Why would you want to use \t? Perhaps you mean \n?
  3. Jimbo

    Jimbo Naked Wanderer

    Instead of adding multiple spaces to format horizontally?
    StreetDog likes this.
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Lots and lots of spaces.
  5. EinTime

    EinTime Plugin Developer

    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. Mughisi

    Mughisi Community Mod Oxide Developer

    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.