You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
34 lines
1.0 KiB
5 years ago
|
-- __ _ _______ _ __
|
||
|
-- / / /\ | | |__ __| | | \ \
|
||
|
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
|
||
|
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
|
||
|
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
|
||
|
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
|
||
|
|
||
5 years ago
|
local menu = {}
|
||
|
|
||
|
function menu.open( dt )
|
||
5 years ago
|
local sw, sh = ScrW(), ScrH()
|
||
|
if( !f ) then
|
||
|
local f = vgui.Create( "DFrame" )
|
||
5 years ago
|
f:SetTitle( "Character Menu" )
|
||
5 years ago
|
f:SetSize( sw, sh )
|
||
5 years ago
|
|
||
|
local txt = vgui.Create( "DTextEntry" )
|
||
|
txt:SetText( "Enter name here" )
|
||
|
txt:SizeToContents()
|
||
|
txt:SetPos( 100, 100 )
|
||
|
|
||
|
local b = vgui.Create( "DButton" )
|
||
5 years ago
|
b:SetText( "Create Char" )
|
||
5 years ago
|
b:SizeToContents()
|
||
|
b.DoClick = function()
|
||
|
net.Start( "quantum_menu_button_net" )
|
||
|
net.WriteString( "createchar" )
|
||
|
net.WriteTable( { name = txt:GetValue() } )
|
||
|
net.SendToServer()
|
||
|
end
|
||
5 years ago
|
end
|
||
5 years ago
|
end
|
||
|
|
||
|
return menu
|