From a549b56e7fd339712048bc1ecc47abc0ef9e5481 Mon Sep 17 00:00:00 2001 From: AlmTech Date: Fri, 1 Nov 2019 20:17:33 +0100 Subject: [PATCH] Server intro & character screen improvments --- .../engine/derma/lib/cl_menu_dialogueBox.lua | 1 - gamemode/engine/derma/lib/cl_menu_theme.lua | 6 ++-- .../engine/derma/menus/menu_character.lua | 25 +++++++++++++ gamemode/engine/derma/menus/menu_intro.lua | 35 ++++++++++++++----- 4 files changed, 55 insertions(+), 12 deletions(-) diff --git a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua index 894bef1..ac62a44 100644 --- a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua +++ b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua @@ -32,7 +32,6 @@ function log.createinfobox( logdata, parent ) header:SetPos( box.x, ( box.y - header.h ) - padding/2 ) header.Think = function( self ) if( logdata[Quantum.Client.Cam.Temp.scene_index].title ~= nil ) then - PrintTable( logdata[Quantum.Client.Cam.Temp.scene_index] ) self:SetVisible( true ) self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title ) surface.SetFont( self:GetFont() ) diff --git a/gamemode/engine/derma/lib/cl_menu_theme.lua b/gamemode/engine/derma/lib/cl_menu_theme.lua index fcb0f86..bf81f33 100644 --- a/gamemode/engine/derma/lib/cl_menu_theme.lua +++ b/gamemode/engine/derma/lib/cl_menu_theme.lua @@ -93,12 +93,14 @@ end function theme.skipbutton( b, inClr ) local w, h = b:GetSize() - inClr = inClr || Color( 235, 64, 52, 255 ) + inClr = inClr || Color( 0, 0, 0, 0 ) if( !b:IsHovered() ) then - surface.SetDrawColor( 205, 205, 205, 255 ) + surface.SetDrawColor( 205, 205, 205, 2 ) + b:SetTextColor( Color( 255, 255, 255, 2 ) ) else surface.SetDrawColor( 120, 120, 120, 255 ) + b:SetTextColor( Color( 255, 255, 255, 255 ) ) end surface.DrawOutlinedRect( 0, 0, w, h ) diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index b425828..b350a68 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -82,6 +82,18 @@ local pages = { p:Remove() end + local scene = { + ["rp_truenorth_v1a_livin"] = { --;setang + [1] = { + fov = 75, + velocity = 10, + pos1 = Vector(11504.430664, 3809.523193, 72.031250), + ang1 = Angle(5, 112.406662, 0.000000) + } + } + } + Quantum.Client.Cam.Start( scene[game.GetMap()], true ) + local banner = vgui.Create( "DImage", p ) banner:SetImage( Quantum.Client.ServerBannerPath ) banner:SizeToContents() @@ -316,8 +328,21 @@ function menu.open( dt ) f:MakePopup() function f:OnClose() Quantum.Client.IsInMenu = false -- show the hud when closed + Quantum.Client.Cam.Stop() end + local scene = { + ["rp_truenorth_v1a_livin"] = { + [1] = { + fov = 70, + velocity = 10, + pos1 = Vector(9807.226563, -9093.957031, 5560.153809), + ang1 = Angle(5.702401, -42.888149, 0.000000) + } + } + } + Quantum.Client.Cam.Start( scene[game.GetMap()], true ) + local args = { CloseButtonText = "Quit", CloseButtonFont = "q_text" diff --git a/gamemode/engine/derma/menus/menu_intro.lua b/gamemode/engine/derma/menus/menu_intro.lua index 12642af..2456488 100644 --- a/gamemode/engine/derma/menus/menu_intro.lua +++ b/gamemode/engine/derma/menus/menu_intro.lua @@ -8,20 +8,28 @@ local intro = {} local log = Quantum.Client.Menu.GetAPI( "dialogue" ) -local theme = local log = Quantum.Client.Menu.GetAPI( "themes" ) +local theme = Quantum.Client.Menu.GetAPI( "theme" ) -local scenes = { +local scenes = { -- 5031.821777 3866.334961 120.090790;setang 0.898059 56.421352 0.000000 ["rp_truenorth_v1a_livin"] = { - [1] = { - fov = 80, + [1] = { + fov = 70, velocity = 10, + pos1 = Vector(5062.544434, 3264.783447, 136.604355), + pos2 = Vector(5031.821777, 3866.334961, 120.090790), + ang1 = Angle(0.370070, 90.952415, 0.000000), + ang2 = Angle(0.898059, 56.421352, 0.000000) + }, + [2] = { + fov = 80, + velocity = 14, pos1 = Vector(6879, 4135, 72), pos2 = Vector(8760, 2740, 86), - ang1 = Angle(7, 122, 0), + ang1 = Angle(0.686861, -43.159401, 0.000000), ang2 = Angle(1, -104, 0) }, - [2] = { - fov = 60, + [3] = { + fov = 70, velocity = 8, pos1 = Vector( 8917, 2194, 83 ), pos2 = Vector( 8312, 2265, 83 ), @@ -45,6 +53,7 @@ function intro.open( dt ) local f = vgui.Create( "DFrame" ) f:SetSize( sw, sh ) f:SetTitle( "" ) + f:ShowCloseButton( false ) f.Paint = function( self, w, h ) surface.SetDrawColor( Color( 20, 20, 20, 255 ) ) local height = 90 * resScale @@ -57,13 +66,21 @@ function intro.open( dt ) Quantum.Client.IsInMenu = false Quantum.Client.Cam.Stop() -- stop the cinematic end + f.w, f.h = f:GetSize() local skip = vgui.Create( "DButton", f ) skip:SetText( "Skip Intro" ) skip:SetFont( "q_button_m" ) skip:SetTextColor( Color( 255, 255, 255, 255 ) ) skip:SizeToContents() - skip.Paint = function( self ) theme.skipbutton( self ) end + skip.Paint = function( self ) theme.skipbutton( self, Color( 0, 0, 0, 0 ) ) end + skip.w, skip.h = skip:GetSize() + skip:SetPos( f.w - skip.w - padding, f.h - skip.h - padding ) + skip.DoClick = function( self ) + surface.PlaySound( "UI/buttonclick.wav" ) + f:Close() + end + skip.OnCursorEntered = function() surface.PlaySound( "UI/buttonrollover.wav" ) end Quantum.Client.Cam.Start( scenes[game.GetMap()], false ) -- start the cinematic @@ -78,7 +95,7 @@ function intro.open( dt ) }, [3] = { title = "Classes & Professions", - text = "Some character classes are better at certain things but worse at other things." + text = "Some character classes are better at certain things but worse at other things. But your class does not define your journey on this server." } }