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
for ent, data in pairs( self.bEnemyMemory ) do
if !IsValid(ent) then
print("wtf")
self.bEnemyMemory[ent] = nil
continue
end

View File

@ -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)

View File

@ -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")
@ -184,4 +182,8 @@ function OpenDebugInv()
itemlist:Dock( FILL )
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") )
end
local bump = -ss(16)
local bump = -ss(32)
for i=#meow, 1, -1 do
local label = meow[i]
local spacer = label == ""
@ -90,4 +90,8 @@ function CreateMainMenu()
bump = bump - (spacer and 12 or (16+4))
end
end
end
concommand.Add("benny_ui_mainmenu", function()
CreateMainMenu()
end)

View File

@ -76,4 +76,8 @@ function OpenSettingsMenu()
genpan( Base, Sect, conf[2] )
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) )
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") )
@ -432,4 +477,8 @@ function OpenSMenu()
end
end
end
end
concommand.Add("benny_ui_spawnmenu", function()
OpenSMenu()
end)

View File

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