|
|
|
@ -31,13 +31,15 @@ function log.createinfobox( logdata, parent ) |
|
|
|
|
header.w, header.h = header:GetSize() |
|
|
|
|
header:SetPos( box.x, ( box.y - header.h ) - padding/2 ) |
|
|
|
|
header.Think = function( self ) |
|
|
|
|
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:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title ) |
|
|
|
|
surface.SetFont( self:GetFont() ) |
|
|
|
|
local tw, th = surface.GetTextSize( self:GetText() ) |
|
|
|
|
self:SetSize( tw * 1.1, th * 1.1 ) |
|
|
|
|
if( Quantum.Client.Cam.Temp != 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:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].title ) |
|
|
|
|
surface.SetFont( self:GetFont() ) |
|
|
|
|
local tw, th = surface.GetTextSize( self:GetText() ) |
|
|
|
|
self:SetSize( tw * 1.1, th * 1.1 ) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
@ -70,8 +72,10 @@ function log.createinfobox( logdata, parent ) |
|
|
|
|
text:SetPos( scroll.w/2 - text.w/2, 0 ) |
|
|
|
|
|
|
|
|
|
text.Think = function( self ) |
|
|
|
|
if( logdata[Quantum.Client.Cam.Temp.scene_index] ~= nil ) then |
|
|
|
|
self:SetText( logdata[Quantum.Client.Cam.Temp.scene_index].text ) |
|
|
|
|
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 ) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|