Bug fixes & improvements & added scenes to menus

master
AlmTech Software 5 years ago
parent 0d235ed425
commit d81ade4c64
  1. 10
      gamemode/engine/derma/lib/cl_menu_dialogueBox.lua
  2. 7
      gamemode/engine/derma/lib/cl_menu_fade.lua
  3. 2
      gamemode/engine/derma/menus/menu_character.lua

@ -31,8 +31,9 @@ function log.createinfobox( logdata, parent )
header.w, header.h = header:GetSize() header.w, header.h = header:GetSize()
header:SetPos( box.x, ( box.y - header.h ) - padding/2 ) header:SetPos( box.x, ( box.y - header.h ) - padding/2 )
header.Think = function( self ) header.Think = function( self )
if( logdata[Quantum.Client.Cam.Temp.scene_index] ~= nil ) then if( Quantum.Client.Cam.Temp != nil ) then
if( logdata[Quantum.Client.Cam.Temp.scene_index].title ~= nil ) then if( logdata[Quantum.Client.Cam.Temp.scene_index] != nil ) then
if( logdata[Quantum.Client.Cam.Temp.scene_index].title != nil ) then
self:SetVisible( true ) self:SetVisible( true )
self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title ) self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title )
surface.SetFont( self:GetFont() ) surface.SetFont( self:GetFont() )
@ -41,6 +42,7 @@ function log.createinfobox( logdata, parent )
end end
end end
end end
end
header.Paint = function( self ) header.Paint = function( self )
theme.sharpblurpanel( self ) theme.sharpblurpanel( self )
end end
@ -70,10 +72,12 @@ function log.createinfobox( logdata, parent )
text:SetPos( scroll.w/2 - text.w/2, 0 ) text:SetPos( scroll.w/2 - text.w/2, 0 )
text.Think = function( self ) text.Think = function( self )
if( logdata[Quantum.Client.Cam.Temp.scene_index] ~= nil ) then if( Quantum.Client.Cam.Temp != nil ) then
if( logdata[Quantum.Client.Cam.Temp.scene_index] != nil ) then
self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].text ) self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].text )
end end
end end
end
return box return box
end end

@ -19,7 +19,7 @@ local function changeAlpha( clr, alpha )
return Color( clr.r, clr.g, clr.b, alpha ) return Color( clr.r, clr.g, clr.b, alpha )
end end
function fade.transition( parent, dt, start_delay, mid_delay, end_delay, inColor, isBlur, startFunc, endFunc ) function fade.transition( parent, dt, start_delay, mid_delay, end_delay, inColor, isBlur, startFunc, endFunc, showHUDonEnd )
local color = inColor || Color( 0, 0, 0, 255 ) local color = inColor || Color( 0, 0, 0, 255 )
local p = vgui.Create( "DPanel" ) local p = vgui.Create( "DPanel" )
@ -37,6 +37,11 @@ function fade.transition( parent, dt, start_delay, mid_delay, end_delay, inColor
surface.DrawRect( 0, 0, w, h ) surface.DrawRect( 0, 0, w, h )
end end
p.OnRemove = function()
if( showHUDonEnd ) then
Quantum.Client.IsInMenu = false
end
end
p.Think = function( self ) p.Think = function( self )
self.time = CurTime() - self.starttime self.time = CurTime() - self.starttime

@ -665,7 +665,7 @@ function menu.open( dt )
local dt = { index = Quantum.Client.selectedChar.index } local dt = { index = Quantum.Client.selectedChar.index }
snm.RunNetworkedFunc( "enterWorldChar", dt ) snm.RunNetworkedFunc( "enterWorldChar", dt )
if( !isFirstTime( Quantum.Client.selectedChar.char ) ) then if( !isFirstTime( Quantum.Client.selectedChar.char ) ) then
fade.transition( f, {}, 1, 2, 1, Color( 0, 0, 0, 255 ), true, Quantum.EmptyFunction, Quantum.EmptyFunction ) -- close the frame fade.transition( f, {}, 1, 2, 1, Color( 0, 0, 0, 255 ), true, Quantum.EmptyFunction, Quantum.EmptyFunction, true ) -- close the frame
end end
-- Open the intro cinematic -- Open the intro cinematic

Loading…
Cancel
Save