Hello everyone,
So i'm trying to make a Gamemode using nutscript, But the GUI of the F1 Menu and the Tab Menu is just ugly.
I was wondering if there is any way for me to change the GUI Using Dermaframe, Or just editing the main file to reshape the menu itself.
Thanks!
[lua]PANEL:Paint()[/lua]or[lua]PANEL.Paint = function()end[/lua]I would recommend PANEL:Paint(), but create your own predefined panel using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/derma/DefineControl]derma.DefineControl[/url]You're welcome :P
If you have more questions about what you can do with these feel free to ask.
[QUOTE=Richtofen;52354305][lua]
PANEL:Paint()
[/lua]
or
[lua]
PANEL.Paint = function()
end
[/lua]
You're welcome :P
If you have more questions about what you can do with these feel free to ask.[/QUOTE]
You forgot to add 'self' as an argument in the second method.
[code]PANEL.Paint = function(self)
end
[/code]
[QUOTE=Sean Bean;52354331]You forgot to add 'self' as an argument in the second method.
[code]PANEL.Paint = function(self)
end
[/code][/QUOTE]
You don't need to call self. It just shortens code...
Example:
[lua]
boob = vgui.Create("DPanel")
boob:SetSize(250,250)
boob:Center()
boob.Paint = function()
draw.RoundedBox(0,0,0,boob:GetWide(),boob:GetTall(),Color(50,120,255))
end
[/lua]
[lua]
boob = vgui.Create("DPanel")
boob:SetSize(250,250)
boob:Center()
boob.Paint = function(self,w,h)
draw.RoundedBox(0,0,0,w,h,Color(50,120,255))
end
[/lua]
[editline]13th June 2017[/editline]
Those two bits of code do the exact same thing. It's just the amount of characters it uses that differ. boob:GetWide() = w, and boob:GetTall() = h. Same exact thing. Please don't correct if you don't know the true answer.
[editline]13th June 2017[/editline]
To add to this, it's probably better if he doesn't call self so he can learn all of the Panel functions and vars. GetWide and GetTall are necessary for a lot of things with panels and it's best that he learns the code rather than just being fed short cuts.
[QUOTE=Richtofen;52354854]You don't need to call self. It just shortens code...[/QUOTE]
I meant if you use the second method you need to define 'self' yourself in the function arguments.
I didn't like the nutscript scoreboard either so I made my own. Here's how it looks
[url]https://gyazo.com/f93c1692f0404884eaab5fa3bf463420[/url]
I do like the F1 menu though. If you want to remove the existing one you'd have to edit nutscript's core files which is highly unreccomended.
[QUOTE=Sean Bean;52355402]I meant if you use the second method you need to define 'self' yourself in the function arguments.[/QUOTE]
You don't pay attention... I said you [U][B]DO NOT[/B][/U] have to call "self" on the second function, it simply shortens code.
[QUOTE=pogh10;52356929]I didn't like the nutscript scoreboard either so I made my own. Here's how it looks
[url]https://gyazo.com/f93c1692f0404884eaab5fa3bf463420[/url]
I do like the F1 menu though. If you want to remove the existing one you'd have to edit nutscript's core files which is highly unreccomended.[/QUOTE]
That scoreboard looks great!
Back to OP. If you want any help with GUI feel free to reply back to the thread with any questions. Or you can add me on steam for some help as well. (I reply faster on steam)
Sorry, you need to Log In to post a reply to this thread.