UI has commands, spawnmenu dumbed for now
This commit is contained in:
parent
8d0a23eb51
commit
ed6ed763ed
|
@ -423,7 +423,6 @@ function ENT:Think()
|
|||
if self:GetState() == "combat" then
|
||||
for ent, data in pairs( self.bEnemyMemory ) do
|
||||
if !IsValid(ent) then
|
||||
print("wtf")
|
||||
self.bEnemyMemory[ent] = nil
|
||||
continue
|
||||
end
|
||||
|
|
|
@ -411,6 +411,6 @@ end
|
|||
|
||||
if IsValid( GOD ) then OpenDeadeye() end
|
||||
|
||||
concommand.Add("benny_dev_deadeye", function()
|
||||
concommand.Add("benny_ui_deadeye", function()
|
||||
OpenDeadeye()
|
||||
end)
|
|
@ -168,9 +168,7 @@ local function regen_items( itemlist )
|
|||
end
|
||||
end
|
||||
end
|
||||
concommand.Add("benny_debug_inv", function()
|
||||
OpenDebugInv()
|
||||
end)
|
||||
|
||||
function OpenDebugInv()
|
||||
if IsValid( base ) then base:Remove() return end
|
||||
base = vgui.Create("BFrame")
|
||||
|
@ -185,3 +183,7 @@ function OpenDebugInv()
|
|||
|
||||
regen_items( itemlist )
|
||||
end
|
||||
|
||||
concommand.Add("benny_ui_inv", function()
|
||||
OpenDebugInv()
|
||||
end)
|
|
@ -68,7 +68,7 @@ function CreateMainMenu()
|
|||
draw.SimpleText( "BENNY", "Benny_72", ss(32), self:GetTall()/2 - ss(58 + (28*0)), schema_c("fg") )
|
||||
end
|
||||
|
||||
local bump = -ss(16)
|
||||
local bump = -ss(32)
|
||||
for i=#meow, 1, -1 do
|
||||
local label = meow[i]
|
||||
local spacer = label == ""
|
||||
|
@ -91,3 +91,7 @@ function CreateMainMenu()
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
concommand.Add("benny_ui_mainmenu", function()
|
||||
CreateMainMenu()
|
||||
end)
|
|
@ -77,3 +77,7 @@ function OpenSettingsMenu()
|
|||
genpan( Base, Sect, conf[2] )
|
||||
end
|
||||
end
|
||||
|
||||
concommand.Add("benny_ui_settings", function()
|
||||
OpenSettingsMenu()
|
||||
end)
|
|
@ -266,7 +266,50 @@ function OpenSMenu()
|
|||
surface.DrawOutlinedRect( 0, 0, w, h, ss(0.5) )
|
||||
end
|
||||
|
||||
-- PROTO: Do regen stats.
|
||||
do
|
||||
local BAR_NAME = statlist:Add( "DLabel" )
|
||||
BAR_NAME:SetTall( ss(18) )
|
||||
BAR_NAME:Dock( TOP )
|
||||
BAR_NAME:DockMargin( 0, 0, 0, ss(2) )
|
||||
function BAR_NAME:Paint( w, h )
|
||||
surface.SetDrawColor( schema("fg") )
|
||||
surface.DrawRect( 0, 0, w, h )
|
||||
|
||||
local rang = WeaponGet( pan_active )
|
||||
draw.SimpleText( rang.Name, "Benny_18", ss(2), ss(2), schema_c("bg") )
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local BAR_DESC = statlist:Add( "DLabel" )
|
||||
BAR_DESC:SetTall( ss(18) )
|
||||
BAR_DESC:Dock( TOP )
|
||||
BAR_DESC:DockMargin( 0, 0, 0, ss(2) )
|
||||
local lastheight = 0
|
||||
function BAR_DESC:Paint( w, h )
|
||||
surface.SetDrawColor( schema("fg") )
|
||||
surface.DrawRect( 0, 0, w, h )
|
||||
|
||||
local rang = WeaponGet( pan_active )
|
||||
local multiline = multlinetext( rang.Description, w-ss(2), "Benny_12" )
|
||||
for i, v in ipairs( multiline ) do
|
||||
local line = i-1
|
||||
local height = ss( 14 + (#multiline-1)*12 )
|
||||
if lastheight != height then
|
||||
BAR_DESC:SetTall( height )
|
||||
lastheight = height
|
||||
end
|
||||
draw.SimpleText( v, "Benny_12", ss(2), ss(2+12*line), schema_c("bg") )
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
for i, us in ipairs( mewer ) do
|
||||
do continue end
|
||||
local fucker = statlist:Add( "DLabel" )
|
||||
fucker:SetTall( ss(us.Size) )
|
||||
fucker:Dock( TOP )
|
||||
|
@ -334,6 +377,7 @@ function OpenSMenu()
|
|||
fucker:Dock( TOP )
|
||||
fucker:DockMargin( 0, 0, 0, ss(2) )
|
||||
function fucker:Paint( w, h )
|
||||
do return true end
|
||||
if pan_active then
|
||||
local hm = WeaponGet( pan_active )
|
||||
surface.SetDrawColor( schema("fg") )
|
||||
|
@ -351,6 +395,7 @@ function OpenSMenu()
|
|||
fucker:Dock( TOP )
|
||||
fucker:DockMargin( 0, 0, 0, ss(2) )
|
||||
function fucker:Paint( w, h )
|
||||
do return true end
|
||||
if pan_active then
|
||||
local hm = WeaponGet( pan_active )
|
||||
surface.SetDrawColor( schema("fg") )
|
||||
|
@ -433,3 +478,7 @@ function OpenSMenu()
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
concommand.Add("benny_ui_spawnmenu", function()
|
||||
OpenSMenu()
|
||||
end)
|
|
@ -4,3 +4,7 @@
|
|||
function OpenScorePanel()
|
||||
|
||||
end
|
||||
|
||||
concommand.Add("benny_ui_score", function()
|
||||
OpenScorePanel()
|
||||
end)
|
Loading…
Reference in New Issue