And what do you have your actual command definited as?
I have plugins that are called by the necessary commands
I start by creating a config, the value of the command is stored here
public string command;
Here I form a menu that will move
public ConfigData GetDefaultConfig()
{
return new ConfigData
{
ZealMicroMenu = new ConfigData.MicroMenu
{
MenuTXT = "",
MenuIC = "",
ColorMenuIC = "#F07427",
MPosXMin = "0.003653084",
MPosXMax = "0.1718864",
MPosYMin = "0.925",
MPosYMax = "0.999",
ButtonElements =
{
new ButtonElement
{
text = "Инфо",
color = "#F0EAD6",
command = "info",
Image = "assets/icons/store.png"
},
new ButtonElement
{
text = "Боевой пропуск",
color = "#F0EAD6",
command = "pass",
Image = "assets/icons/radiation.png"
},
new ButtonElement
{
text = "Репорт",
color = "#F0EAD6",
command = "report",
Image = "assets/icons/bite.png"
},
new ButtonElement
{
text = "Вайп Блок",
color = "#F0EAD6",
command = "block",
Image = "assets/icons/pills.png"
}
}
}
};
}
By this cycle I create buttons
Gui.Add(new CuiButton
{
Button =
{
Command = button.command,
Color = "0 0 0 0",
},
Text =
{
Align = TextAnchor.MiddleLeft,
Color = HexToRustFormat(button.color),
FontSize = 15,
Text = $"{button.text}",
Font = "robotocondensed-regular.ttf",
FadeIn = 0.1f + (num * 0.1f)
},
RectTransform =
{
AnchorMin = $"{0.2012334} {-0.412 - (y * 0.5)}",
AnchorMax = $"{1} {0.05 - (y * 0.5)}"
}
}, Layer, "but" + num);
y++;
num++;
}
hide_open = true;
}