Hi, if I use CuiTextComponent and CuiButtonComponent, get error RPC Error id AddUI. How to add a shadow to the button text?
CUI button + text shadow
Discussion in 'Rust Development' started by Bear 9, Dec 13, 2017.
-
Wulf Community Admin
How are you using it exactly? That error implies that invalid JSON (what the CUI uses) was sent to the client.
-
Code:
container.Add(new CuiElement { Parent = panel, Components = { new CuiButtonComponent { Color = color, Command = command }, new CuiRectTransformComponent { AnchorMin = aMin, AnchorMax = aMax }, new CuiOutlineComponent { Distance = "1 1", Color = "0 0 0 1" }, new CuiTextComponent { Text = text, FontSize = size, Align = align, Color = "1 1 1 0.8" } } });
-
Little late, but try giving this a look: Rust.Community/CommunityEntity.UI.cs at master · Facepunch/Rust.Community · GitHub