|
|
@ -40,16 +40,23 @@ function menu.open( dt ) |
|
|
|
Quantum.Client.Cam.Start( scenes, true, false ) |
|
|
|
Quantum.Client.Cam.Start( scenes, true, false ) |
|
|
|
|
|
|
|
|
|
|
|
local dialogue = Quantum.Dialogue.Get( dt.cont.dialogueID ) |
|
|
|
local dialogue = Quantum.Dialogue.Get( dt.cont.dialogueID ) |
|
|
|
|
|
|
|
local node |
|
|
|
|
|
|
|
if( dt.cont.nodeid != nil ) then |
|
|
|
|
|
|
|
node = Quantum.Node.Get(dt.cont.nodeid) |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
Quantum.Error("Unable to fetch node table. Node ID is nil.") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
local f = vgui.Create( "DFrame" ) |
|
|
|
local f = vgui.Create( "DFrame" ) |
|
|
|
f:SetSize( sw, sh ) |
|
|
|
f:SetSize( sw, sh ) |
|
|
|
f:SetTitle( "" ) |
|
|
|
f:SetTitle( "" ) |
|
|
|
f:ShowCloseButton( false ) |
|
|
|
f:ShowCloseButton( false ) |
|
|
|
|
|
|
|
local borderHeight = 90 * resScale |
|
|
|
f.Paint = function( self, w, h ) |
|
|
|
f.Paint = function( self, w, h ) |
|
|
|
surface.SetDrawColor( Color( 20, 20, 20, 255 ) ) |
|
|
|
surface.SetDrawColor( Color( 20, 20, 20, 255 ) ) |
|
|
|
local height = 90 * resScale |
|
|
|
surface.DrawRect( 0, 0, w, borderHeight ) |
|
|
|
surface.DrawRect( 0, 0, w, height ) |
|
|
|
surface.DrawRect( 0, h - borderHeight, w, borderHeight ) |
|
|
|
surface.DrawRect( 0, h - height, w, height ) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
f:SetDraggable( false ) |
|
|
|
f:SetDraggable( false ) |
|
|
|
f:MakePopup() |
|
|
|
f:MakePopup() |
|
|
@ -70,9 +77,13 @@ function menu.open( dt ) |
|
|
|
end |
|
|
|
end |
|
|
|
f.w, f.h = f:GetSize() |
|
|
|
f.w, f.h = f:GetSize() |
|
|
|
|
|
|
|
|
|
|
|
local q = vgui.Create( "DLabel", f ) |
|
|
|
local title = vgui.Create( "DLabel", f ) -- dialogue title, useally the npcs name or something |
|
|
|
q:SetText("Test") |
|
|
|
title:SetText(node.name) |
|
|
|
|
|
|
|
title:SetFont("q_header_s") |
|
|
|
|
|
|
|
title:SetTextColor(Color(255, 255, 255, 120)) |
|
|
|
|
|
|
|
title:SizeToContents() |
|
|
|
|
|
|
|
title.w, title.h = title:GetSize() |
|
|
|
|
|
|
|
title:SetPos( padding*2, borderHeight/2 - title.h/2 ) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|