i Seem to not be doing somthing right i cant move the buttons apart the deposit 5 and the deposit 10.
var mainName = elements.Add(new CuiPanel
{
Image =
{
Color = "0.1 0.1 0.1 1"
},
RectTransform =
{
AnchorMin = "0 0",
AnchorMax = "1 1"
},
CursorEnabled = true
}, "Overlay", "ATM");
if (backroundimage == true)
{
elements.Add(new CuiElement
{
Parent = "Atm",
Components =
{
new CuiRawImageComponent
{
Url = backroundimageurl,
Sprite = "assets/content/textures/generic/fulltransparent.tga"
},
new CuiRectTransformComponent
{
AnchorMin = "0 0",
AnchorMax = "1 1"
}
}
});
}
var Agree = new CuiButton
{
Button =
{
Command = $"takemoney {player.userID} 5",
Close = mainName,
Color = "0 255 0 1"
},
RectTransform =
{
AnchorMin = "0.2 0.16",
AnchorMax = "0.45 0.2"
},
Text =
{
Text = "Deposit 5",
FontSize = 22,
Align = TextAnchor.MiddleCenter
}
};
var depo10 = new CuiButton
{
Button =
{
Command = $"takemoney {player.userID} 10",
Close = mainName,
Color = "0 255 0 1"
},
RectTransform =
{
AnchorMin = "0.2 0.16",
AnchorMax = "0.45 0.2"
},
Text =
{
Text = "Deposit 10",
FontSize = 22,
Align = TextAnchor.MiddleCenter
}
};
var Disagree = new CuiButton
{
Button =
{
Close = mainName,
Color = "255 0 0 1"
},
RectTransform =
{
AnchorMin = "0.5 0.16",
AnchorMax = "0.75 0.2"
},
Text =
{
Text = "Cancel",
FontSize = 22,
Align = TextAnchor.MiddleCenter
}
};
elements.Add(new CuiLabel
{
Text =
{
Text = msg,
FontSize = 22,
Align = TextAnchor.MiddleCenter
},
RectTransform =
{
AnchorMin = "0 0.20",
AnchorMax = "1 0.9"
}
}, mainName);
elements.Add(Agree, mainName);
elements.Add(depo10, mainName);
elements.Add(Disagree, mainName);
CuiHelper.AddUi(player, elements);
}
}
}
