Finished intro cinematic & added main menu

master
AlmTech Software 5 years ago
parent e08205fb05
commit 546a1beaf8
  1. 9
      gamemode/engine/core/sh_player_binds.lua
  2. 7
      gamemode/engine/derma/lib/cl_menu_theme.lua
  3. 40
      gamemode/engine/derma/menus/menu_intro.lua
  4. 77
      gamemode/engine/derma/menus/menu_main.lua
  5. 3
      gamemode/engine/lib/client/cl_cinematic.lua

@ -9,14 +9,11 @@
if SERVER then
local keyfuncs = {
[IN_USE] = function( pl )
Quantum.Debug( tostring( pl ) .. " pressed IN_USE" )
end,
["openCharMenu"] = function( pl )
Quantum.Net.OpenMenu( pl, "character", Quantum.Server.Char.GetPlayerChars_cl( pl ) )
end,
["introTest"] = function( pl )
Quantum.Net.OpenMenu( pl, "intro", Quantum.Server.Char.GetPlayerChars_cl( pl ) )
["mainMenu"] = function( pl )
Quantum.Net.OpenMenu( pl, "main", Quantum.Server.Char.GetPlayerChars_cl( pl ) )
end
}
@ -24,6 +21,6 @@ if SERVER then
if( keyfuncs[key] ) then keyfuncs[key]( ply ) end
end
function GM:ShowHelp( ply ) keyfuncs["openCharMenu"]( ply ) end
function GM:ShowTeam( ply ) keyfuncs["introTest"]( ply ) end
function GM:ShowTeam( ply ) keyfuncs["mainMenu"]( ply ) end
end

@ -12,7 +12,8 @@ local padding_s = math.Round( 4 * scale )
local blur = Material("pp/blurscreen")
local function renderBlur( p, a, d )
function theme.renderblur( p, a, d )
local x, y = p:LocalToScreen( 0, 0 )
surface.SetDrawColor( 255, 255, 255 )
surface.SetMaterial( blur )
@ -46,7 +47,7 @@ function theme.blurpanel( p, color )
local w, h = p:GetSize()
local clr = color || Color( 0, 0, 0, 200 )
local bclr = Color( 50, 50, 50, 105 )
renderBlur( p, 2, 7 )
theme.renderblur( p, 2, 7 )
draw.RoundedBox( 6, 0, 0, w, h, bclr ) -- border
draw.RoundedBox( 4, padding_s/2, padding_s/2, w - padding_s, h - padding_s, clr ) -- inner
@ -57,7 +58,7 @@ function theme.sharpblurpanel( p, color )
local clr = color || Color( 0, 0, 0, 200 )
surface.SetDrawColor( clr )
surface.DrawRect( 0, 0, w, h )
renderBlur( p, 2, 7 )
theme.renderblur( p, 2, 7 )
theme.borderpanel( p, Color( 255, 255, 255, 255 ) )
end

@ -22,7 +22,7 @@ local scenes = { -- 5031.821777 3866.334961 120.090790;setang 0.898059 56.421352
},
[2] = {
fov = 80,
velocity = 16,
velocity = 12,
pos1 = Vector(6879, 4135, 72),
pos2 = Vector(8760, 2740, 86),
ang1 = Angle(0.686861, -43.159401, 0.000000),
@ -46,19 +46,27 @@ local scenes = { -- 5031.821777 3866.334961 120.090790;setang 0.898059 56.421352
},
[5] = {
fov = 60,
velocity = 12,
velocity = 16,
pos1 = Vector( 6830.229004, 9614.283203, 105.920792 ),
pos2 = Vector( 6675.346191, 9711.740234, 102.549484 ),
ang1 = Angle( 1.055771, 147.803604, 0.000000 ),
ang2 = Angle( 1.055771, 149.803604, 0.000000 )
},
[6] = {
fov = 60,
velocity = 15,
pos1 = Vector( 3114.608887, -13817.962891, 82.778885 ),
pos2 = Vector( 5247.718262, -14413.496094, 74.946350 ),
ang1 = Angle( 0.844603, -15.770578, 0.000000 ),
ang2 = Angle( 2.006202, 37.927032, 0.000000 )
},
[6] = {
[7] = {
fov = 60,
velocity = 12,
pos1 = Vector( 6830.229004, 9614.283203, 105.920792 ),
pos2 = Vector( 6675.346191, 9711.740234, 102.549484 ),
ang1 = Angle( 1.055771, 147.803604, 0.000000 ),
ang2 = Angle( 1.055771, 149.803604, 0.000000 )
velocity = 14,
pos1 = Vector( 4964.591797, 4514.272461, 213.532272 ),
pos2 = Vector( 5047.838379, 3216.407959, 128.219254 ),
ang1 = Angle( 8.131199, -77.082695, 0.000000 ),
ang2 = Angle( 0.422407, -89.520081, 0.000000 )
}
}
}
@ -93,6 +101,10 @@ function intro.open( dt )
end
f.w, f.h = f:GetSize()
f.Think = function( self )
if( Quantum.Client.Cam.Temp.Finished == true ) then self:Close() end -- if the scene is finished then close the menu and exit the cinematic
end
--- MUSIC ---
--surface.PlaySound( "music/HL1_song10.mp3" ) -- too short
--surface.PlaySound( "music/HL2_song23_SuitSong3.mp3" )
@ -131,8 +143,16 @@ function intro.open( dt )
text = "Character classes are also one of many key element to the core gameplay. Some character classes are better at certain things but worse at other things, but your class does not define your journey and you have the freedom to choose whatever you want to do."
},
[5] = {
title = "Different Professions",
text = "There are different kinds of professions. These professions range from gathering resources, crafting items and even combat. But choose wisely becuase " -- insert more text later
title = "Factions & Zones",
text = "As a citizen on the server you can join or create your own faction. Factions are considered as an organization where players can band together to achieve goals and dominate a certain area on the map. But be aware that there exists more than one faction."
},
[6] = {
title = "Factions & Zones",
text = "All factions can controll zones if they have enough resources. Some zones/areas of the map contain different resources than others, therefore they might be more valuable to the other factions.\nA zone can be taken over by any faction but there might be competition which might conclude in a war."
},
[7] = {
title = "Questions & Help",
text = "If you have any questions about the server just join our discord server and we will be more than happy to give you a answer. If you need help with something in-game then you might consider contacting a 'Server-Master' which are the moderators of the server. Good luck!"
}
}

@ -0,0 +1,77 @@
-- __ _ _______ _ __
-- / / /\ | | |__ __| | | \ \
-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \
-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > >
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
local main = {}
local theme = Quantum.Client.Menu.GetAPI( "theme" )
local scenes = {
["rp_truenorth_v1a_livin"] = {
[1] = {
[1] = {
fov = 60,
velocity = 1,
pos1 = Vector( 3473.962158, -5456.522949, 4205.845703 ),
ang1 = Angle( 6.283165, -108.298935, 0.000000 )
}
},
[2] = {
[1] = {
fov = 70,
velocity = 1,
pos1 = Vector( 10481.976562, -6193.810059, 5464.451172 ),
ang1 = Angle( 3.220725, 103.288849, 0.000000 )
}
},
[3] = {
[1] = {
fov = 85,
velocity = 1,
pos1 = Vector( 6285.742676, -14192.770508, 53.289391 ),
ang1 = Angle( -0.052740, 158.862747, 0.000000 )
}
},
[4] = {
[1] = {
fov = 85,
velocity = 1,
pos1 = Vector( -11803.785156, -13864.571289, -39.331917 ),
ang1 = Angle( 7.180876, 118.805817, 0.000000 )
}
}
}
}
function main.open(dt)
if( !f ) then
Quantum.Client.IsInMenu = true -- hide the hud
local resScale = Quantum.Client.ResolutionScale
local sw, sh = ScrW(), ScrH()
local padding = 10 * resScale
local padding_s = 4 * resScale
local f = vgui.Create( "DFrame" )
f:SetSize( sw, sh )
f:SetTitle( "" )
f:IsDraggable( false )
f:MakePopup()
f.Paint = function( self )
theme.renderblur( self, 2, 7 )
end
f.OnClose = function( self )
Quantum.Client.IsInMenu = false
Quantum.Client.Cam.Stop()
end
Quantum.Client.Cam.Start( scenes[ game.GetMap() ][math.random( 1, table.Count(scenes[ game.GetMap() ])) ], false )
end
end
return main

@ -20,6 +20,7 @@ function Quantum.Client.Cam.Start( scene, loop )
local time -- speed of the camera ( how long till it reaches its finish point )
local fov
Quantum.Client.Cam.Temp = {}
Quantum.Client.Cam.Temp.Finished = false
Quantum.Client.Cam.Temp.scene_index = 1
local view = {} -- calcview vector data
@ -44,6 +45,8 @@ function Quantum.Client.Cam.Start( scene, loop )
if( Quantum.Client.Cam.Temp.scene_index + 1 <= #scene ) then
frac = 0
Quantum.Client.Cam.Temp.scene_index = Quantum.Client.Cam.Temp.scene_index + 1
else
Quantum.Client.Cam.Temp.Finished = true -- tell the menu that the scene is finished
end
if( Quantum.Client.Cam.Temp.scene_index > #scene ) then -- if all scenes are finished, loop them if loop is enabled
Quantum.Client.Cam.Temp.scene_index = 1

Loading…
Cancel
Save