Hello,
I'm actually trying to make a gui for a phone application. I was wondering if there is any way to size a cui element with pixel instead of the anchors ?
I've seen that the offset is the size in pixel, and anchors are screen relative transforms. (https://umod.org/community/rust/11385-moving-cui-buttonselements -> @2CHEVSKII reply).
I did exactly what he said in the reply :
I'm actually trying to make a gui for a phone application. I was wondering if there is any way to size a cui element with pixel instead of the anchors ?
I've seen that the offset is the size in pixel, and anchors are screen relative transforms. (https://umod.org/community/rust/11385-moving-cui-buttonselements -> @2CHEVSKII reply).
I did exactly what he said in the reply :
var PhoneGUI = elements.Add(new CuiPanel {
Image = {
Color = "1 1 1 1"
},
RectTransform = {
AnchorMin = "0.5 0.5",
AnchorMax = "0.6 0.6",
OffsetMax = "-50 -20", // Pixel size?
OffsetMin = "50 20" // Pixel size?
},
CursorEnabled = true,
FadeOut = 0.1f },
"Overlay",
"Phone");And the gui is actually not showing...
I don't really understand how CUI system works...
Thank you for your help, and sorry for my bad english, I'm french :/