Basically what i want it to know if its possible to SetConVars to buttons, if so how would you do this?
What i have so for is this, but i get errors. :rollout:
local Text = ""
local ConVar = ""
local function AddDermaButton(Parent, TextFont, ConVar, TextColor, Text, ButtonColor, W, H, X, Y)
local DermaButton = vgui.Create("DButton", Parent)
DermaButton:SetPos(X, Y)
DermaButton:SetFont(TextFont)
DermaButton:SetText(Text)
DermaButton:SetSize(W, H)
DermaButton:SetTextColor(TextColor)
DermaButton:SetColor(ButtonColor)
DermaButton:SetConVar(ConVar)
end
Note: I’m still new to LUA, so i might not know a’lot of things. So please don’t make fun of me. ;-;
Thank you for the help!
(User was banned for this post ("Wrong section. Go to the DEVELOPER DISCUSSION FOR DERMA help next time" - Kiwi))