I created CuiPanel. What values should be inCode:var elements = new CuiElementContainer(); var mainName = elements.Add(new CuiPanel { Image = { Color = "0.1 0.1 0.1 1" }, RectTransform = { AnchorMin = "", AnchorMax = "" }, CursorEnabled = true });
to make this panel at the center with size like this > Instant Screen Grabbing App ? Where can i watch how to create buttons and etc with size which i need?Code:AnchorMin = "", AnchorMax = ""
Centering CUI panel
Discussion in 'Rust Development' started by Shade4, Sep 12, 2017.
-
Wulf Community Admin
-
-
To center your UI you have to put width from your left screen border to your left UI border and your left screen border to your right UI border.
If you put
Code:var elements = new CuiElementContainer(); var mainName = elements.Add(new CuiPanel { Image = { Color = "0.1 0.1 0.1 1" }, RectTransform = { AnchorMin = "0.15 0", AnchorMax = "0.85 1" }, CursorEnabled = true });
0.85 is the distance from left to right (screen to UI )
0 is the distance from bottom of your screen to bottom of your UI
1 is the distance from bottom of your screen to top of your UI -
-
This is the best tool ever!
Who made it?
Does it have open source code?
Where I can donate to this godlike human being?!