Fixed server banner in menus and stuff

master
AlmTech 5 years ago
parent 285397d944
commit 2705f3d343
  1. 1
      gamemode/cl_init.lua
  2. 13
      gamemode/engine/derma/menus/menu_character.lua
  3. 4
      gamemode/init.lua

@ -9,6 +9,7 @@ if CLIENT then
include( "shared.lua" )
Quantum.Client = {}
Quantum.Client.ResolutionScale = ScrH() / 1080
Quantum.Client.ServerBannerPath = "gamemodes/" .. GAMEMODE.FolderName .. "/gamemode/content/materials/quantum/server_banner.png"
local function loadCoreFiles()
local fol = GM.FolderName .. "/gamemode/engine/core/"

@ -120,12 +120,6 @@ function menu.open( dt )
f.page = p
f.page:SetVisible( true )
local banner = vgui.Create( "DImage", p )
banner:SetSize( 480 * resScale, 120 * resScale )
banner:SetImage( "content/materials/quantum/server_banner.png" )
banner.w, banner.h = banner:GetSize()
banner:SetPos( padding, padding )
local clist = vgui.Create( "DScrollPanel", p )
clist:SetSize( 380 * resScale, sh - padding*15 )
clist.w, clist.h = clist:GetSize()
@ -148,6 +142,13 @@ function menu.open( dt )
end
---
local banner = vgui.Create( "DImage", p )
banner:SetImage( Quantum.Client.ServerBannerPath )
banner:SizeToContents()
banner.w, banner.h = banner:GetSize()
banner:SetSize( (banner.w * resScale)/2.8, (banner.h * resScale)/2.8 )
banner:SetPos( padding, padding )
local header = vgui.Create( "DLabel", p )
header:SetText( "Characters" )
header:SetFont( "q_header" )

@ -12,8 +12,8 @@ if SERVER then
AddCSLuaFile( "shared.lua" )
-- Content --
resource.AddFile("content/materials/quantum/server_banner.png")
-------------
local path = "gamemodes/" .. GM.FolderName .. "/gamemode/content/materials/quantum/server_banner.png"
resource.AddSingleFile( path )
include( "shared.lua" )

Loading…
Cancel
Save