Hello Facepunch, I need a little bit of help learning a few things regarding derma and a few other things. Please don’t hesitate to provide links that will help me with what I need. I attempted to search online for awhile but to no real avail. The following code is taken from some scripts that I attempted to look at and study for future reference but I couldn’t find too much information on it.
GET TO THE POINT!
So these codes were taken from Niandra’s MOTD.
1-- Setting Size and Positioning.
frame:SetSize(ScrW(), 200) I honestly just need a reference guide to this one to figure out how this works. Something that will teach me vector positioning for gmod.
local frame = vgui.Create("DFrame") frame:SetSize**(ScrW(), 200)** frame:SetPos(0, 75) frame:ShowCloseButton(true) frame.Paint = function() draw.RoundedBox(0, 0, 0, ScrW(), 200, NiandraMOTD.MainFrameColour) end
I don’t know what the (ScrW()-200-NiandraMOTD.HTMLSpacing and stuff alike mean, or what exactly it does.
Y+, X+, -, +
local NiandraMOTD_HTML_Panel = vgui.Create("HTML", frame) NiandraMOTD_HTML_Panel:SetPos(NiandraMOTD.HTML_Y+NiandraMOTD.HTMLSpacing, NiandraMOTD.HTML_X+NiandraMOTD.HTMLSpacing) NiandraMOTD_HTML_Panel:SetSize(ScrW()-200-NiandraMOTD.HTMLSpacing-NiandraMOTD.HTMLSpacing-NiandraMOTD.HTMLSpacing, 550) NiandraMOTD_HTML_Panel:OpenURL(NiandraMOTD.DefaultWebpage)
3-- Couldn’t find anything on this other than it was python I think.
I have no Idea where k, v does.
for k, v in pairs(NiandraMOTD.ButtonsTable) do
Yes I’m a newb.