Updated CUI Coding Information?

Can anyone provide me with a link for coding CUIs? 

Besides common info & best practices I'm looking for setting the LAYER of the UI.

GUIElement.Add(new CuiButton
{
Button =
{
Command = "adminpanel action radar",
Color = BTNColorRadar
},
Text =
{
Text = _("Radar", player.UserIDString),
FontSize = config.fontSize,
Align = TextAnchor.MiddleCenter,
Color = "1 1 1 1",
Layer = "HUD" <--------- Doesn't Work :(
},
RectTransform =
{
AnchorMin = "0.062 0.21",
AnchorMax = "0.51 0.37"
}
}, GUIPanel);
I know it's addressable because I can doing it in other plugins differently.  Perhaps I'm jsut putting that property setting in the wrong place?

Thank you but I already have that link. 

Unfortunately that webpage does NOT tell me how to code this (see above 'Layer = "HUD"' doesn't work).  And if it was expecting "Hud" vs. "HUD" then I'd expect the error message to state that vs. it not knowing what "Layer" was.

That is, the code in my original post errors on the server because it doesn't know what Layer is and therefore can not set it to any of the recognized Rust layers.  So either I'm putting it in the wrong place (i.e. under Text, Button, RectTransform, etc.) or the assiciated libraries simply don't know what it is.

goJz3L1580eV5Ey.png DiGiaComTech

Thank you but I already have that link. 

Unfortunately that webpage does NOT tell me how to code this (see above 'Layer = "HUD"' doesn't work).  And if it was expecting "Hud" vs. "HUD" then I'd expect the error message to state that vs. it not knowing what "Layer" was.

That is, the code in my original post errors on the server because it doesn't know what Layer is and therefore can not set it to any of the recognized Rust layers.  So either I'm putting it in the wrong place (i.e. under Text, Button, RectTransform, etc.) or the assiciated libraries simply don't know what it is.

https://github.com/OxideMod/Oxide.Rust/blob/develop/src/RustCui.cs

 

Error while compiling ServerInfo: 'CuiButtonComponent' does not contain a definition for 'Layer'...



Merged post

OK ... I think I figured this out.  It isn't put in GUIElement.Add, it's put in container.Add (i.e, 'Overlay')...

var backgroundName = container.Add(myBackground, "Overlay", "MyBackgroundName");