UI has commands, spawnmenu dumbed for now

This commit is contained in:
Fesiug 2024-01-01 17:56:49 -05:00
parent 8d0a23eb51
commit ed6ed763ed
7 changed files with 73 additions and 11 deletions

View File

@ -423,7 +423,6 @@ function ENT:Think()
if self:GetState() == "combat" then if self:GetState() == "combat" then
for ent, data in pairs( self.bEnemyMemory ) do for ent, data in pairs( self.bEnemyMemory ) do
if !IsValid(ent) then if !IsValid(ent) then
print("wtf")
self.bEnemyMemory[ent] = nil self.bEnemyMemory[ent] = nil
continue continue
end end

View File

@ -411,6 +411,6 @@ end
if IsValid( GOD ) then OpenDeadeye() end if IsValid( GOD ) then OpenDeadeye() end
concommand.Add("benny_dev_deadeye", function() concommand.Add("benny_ui_deadeye", function()
OpenDeadeye() OpenDeadeye()
end) end)

View File

@ -168,9 +168,7 @@ local function regen_items( itemlist )
end end
end end
end end
concommand.Add("benny_debug_inv", function()
OpenDebugInv()
end)
function OpenDebugInv() function OpenDebugInv()
if IsValid( base ) then base:Remove() return end if IsValid( base ) then base:Remove() return end
base = vgui.Create("BFrame") base = vgui.Create("BFrame")
@ -185,3 +183,7 @@ function OpenDebugInv()
regen_items( itemlist ) regen_items( itemlist )
end end
concommand.Add("benny_ui_inv", function()
OpenDebugInv()
end)

View File

@ -68,7 +68,7 @@ function CreateMainMenu()
draw.SimpleText( "BENNY", "Benny_72", ss(32), self:GetTall()/2 - ss(58 + (28*0)), schema_c("fg") ) draw.SimpleText( "BENNY", "Benny_72", ss(32), self:GetTall()/2 - ss(58 + (28*0)), schema_c("fg") )
end end
local bump = -ss(16) local bump = -ss(32)
for i=#meow, 1, -1 do for i=#meow, 1, -1 do
local label = meow[i] local label = meow[i]
local spacer = label == "" local spacer = label == ""
@ -91,3 +91,7 @@ function CreateMainMenu()
end end
end end
concommand.Add("benny_ui_mainmenu", function()
CreateMainMenu()
end)

View File

@ -77,3 +77,7 @@ function OpenSettingsMenu()
genpan( Base, Sect, conf[2] ) genpan( Base, Sect, conf[2] )
end end
end end
concommand.Add("benny_ui_settings", function()
OpenSettingsMenu()
end)

View File

@ -266,7 +266,50 @@ function OpenSMenu()
surface.DrawOutlinedRect( 0, 0, w, h, ss(0.5) ) surface.DrawOutlinedRect( 0, 0, w, h, ss(0.5) )
end 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 for i, us in ipairs( mewer ) do
do continue end
local fucker = statlist:Add( "DLabel" ) local fucker = statlist:Add( "DLabel" )
fucker:SetTall( ss(us.Size) ) fucker:SetTall( ss(us.Size) )
fucker:Dock( TOP ) fucker:Dock( TOP )
@ -334,6 +377,7 @@ function OpenSMenu()
fucker:Dock( TOP ) fucker:Dock( TOP )
fucker:DockMargin( 0, 0, 0, ss(2) ) fucker:DockMargin( 0, 0, 0, ss(2) )
function fucker:Paint( w, h ) function fucker:Paint( w, h )
do return true end
if pan_active then if pan_active then
local hm = WeaponGet( pan_active ) local hm = WeaponGet( pan_active )
surface.SetDrawColor( schema("fg") ) surface.SetDrawColor( schema("fg") )
@ -351,6 +395,7 @@ function OpenSMenu()
fucker:Dock( TOP ) fucker:Dock( TOP )
fucker:DockMargin( 0, 0, 0, ss(2) ) fucker:DockMargin( 0, 0, 0, ss(2) )
function fucker:Paint( w, h ) function fucker:Paint( w, h )
do return true end
if pan_active then if pan_active then
local hm = WeaponGet( pan_active ) local hm = WeaponGet( pan_active )
surface.SetDrawColor( schema("fg") ) surface.SetDrawColor( schema("fg") )
@ -433,3 +478,7 @@ function OpenSMenu()
end end
end end
concommand.Add("benny_ui_spawnmenu", function()
OpenSMenu()
end)

View File

@ -4,3 +4,7 @@
function OpenScorePanel() function OpenScorePanel()
end end
concommand.Add("benny_ui_score", function()
OpenScorePanel()
end)