diff --git a/gamemode/engine/core/client/cl_fonts.lua b/gamemode/engine/core/client/cl_fonts.lua index d54286b..154f709 100644 --- a/gamemode/engine/core/client/cl_fonts.lua +++ b/gamemode/engine/core/client/cl_fonts.lua @@ -59,4 +59,10 @@ surface.CreateFont( "q_header", { font = "Constantia Bold Italic", size = 50 * Quantum.Client.ResolutionScale, antialias = true +}) + +surface.CreateFont( "q_header_s", { + font = "Constantia Bold Italic", + size = 42 * Quantum.Client.ResolutionScale, + antialias = true }) \ No newline at end of file diff --git a/gamemode/engine/core/server/sv_player_init.lua b/gamemode/engine/core/server/sv_player_init.lua index b7291aa..044e732 100644 --- a/gamemode/engine/core/server/sv_player_init.lua +++ b/gamemode/engine/core/server/sv_player_init.lua @@ -20,7 +20,12 @@ local function setUpPlayer( ply ) else Quantum.Error( tostring(ply) .. " doesn't have a valid model. Unable to set up hands!" ) end - Quantum.Debug( tostring( ply ) .. " spawned." ) + local char = Quantum.Server.Char.GetCurrentCharacter( ply ) + local charnametxt = " spawned." + if( char ~= nil ) then + charnametxt = " spawned as '" .. char.name .. "'." + end + Quantum.Debug( tostring( ply ) .. charnametxt ) end function GM:PlayerSpawn( ply ) diff --git a/gamemode/engine/derma/cl_menu.lua b/gamemode/engine/derma/cl_menu.lua index 21f627e..46a9b05 100644 --- a/gamemode/engine/derma/cl_menu.lua +++ b/gamemode/engine/derma/cl_menu.lua @@ -9,7 +9,8 @@ Quantum.Client.Menu = {} local libs = { ["net"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_network.lua", ["page"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_pages.lua", - ["theme"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_theme.lua" + ["theme"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_theme.lua", + ["dialogue"] = GM.FolderName .. "/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua" } Quantum.Client.Menu.GetAPI = function( lib ) return include( libs[lib] ) end diff --git a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua index 7dddf5d..ba12b8d 100644 --- a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua +++ b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua @@ -12,14 +12,36 @@ local padding_s = 4 * scale local theme = Quantum.Client.Menu.GetAPI( "theme" ) -function log.createinfobox( text, parent ) +function log.createinfobox( title, text, parent ) + local fw, fh = parent:GetSize() local box = vgui.Create( "DPanel", parent ) - box:SetSize( 250 * scale, 80 * scale ) - box.Paint = function( self ) theme.panel( self, Color( 0, 0, 0, 100 ) ) + box:SetSize( 775 * scale, 200 * scale ) + box.Paint = function( self ) theme.blurpanel( self, Color( 0, 0, 0, 0 ) ) end box.w, box.h = box:GetSize() + box:SetPos( fw/2 - box.w/2, fh*0.8 - box.h/2 ) + box.x, box.y = box:GetSize() + + local header = vgui.Create( "DLabel", parent ) + header:SetText( title ) + header:SetFont( "q_header_s" ) + header:SetTextColor( Color( 255, 255, 255, 220 ) ) + header:SizeToContents() + header.w, header.h = header:GetSize() + header:SetPos( box.x - box.w/2 + header.w/2, box.y ) local scroll = vgui.Create( "DScrollPanel", box ) - --scroll:SetSize() + scroll:SetSize( box:GetSize() ) + scroll.Paint = function( self ) end + local sb = scroll:GetVBar() + sb.Paint = function( self ) end + function sb.btnGrip:Paint() + theme.button( self, Color( 0, 0, 0, 80 ) ) + end + sb.btnUp:SetSize(0,0) + sb.btnDown:SetSize(0,0) + return box -end \ No newline at end of file +end + +return log \ No newline at end of file diff --git a/gamemode/engine/derma/menus/menu_intro.lua b/gamemode/engine/derma/menus/menu_intro.lua index 3f39086..b34f1f5 100644 --- a/gamemode/engine/derma/menus/menu_intro.lua +++ b/gamemode/engine/derma/menus/menu_intro.lua @@ -7,6 +7,8 @@ local intro = {} +local log = Quantum.Client.Menu.GetAPI( "dialogue" ) + local scenes = { ["rp_truenorth_v1a_livin"] = { [1] = { @@ -41,8 +43,13 @@ function intro.open( dt ) local f = vgui.Create( "DFrame" ) f:SetSize( sw, sh ) - f:SetTitle( "Cinematic Intro Test" ) - f.Paint = function( self ) end + f:SetTitle( "" ) + f.Paint = function( self, w, h ) + surface.SetDrawColor( Color( 20, 20, 20, 255 ) ) + local height = 90 * resScale + surface.DrawRect( 0, 0, w, 90 * resScale ) + surface.DrawRect( 0, h - height, w, height ) + end f:SetDraggable( false ) f:MakePopup() function f:OnClose() @@ -51,6 +58,7 @@ function intro.open( dt ) end Quantum.Client.Cam.Start( scenes[game.GetMap()], false ) -- start the cinematic + local box = log.createinfobox( "Sample Title", "TEST", f ) end end