Added more info to crafting UI

master
AlmTech Software 5 years ago
parent 9638d2c49f
commit f1dfcb5088
  1. 13
      gamemode/engine/derma/menus/menu_crafting.lua
  2. 2
      gamemode/engine/vars/sh_vars.lua

@ -31,7 +31,7 @@ end
local function createItemAmountLabel( icon, item ) local function createItemAmountLabel( icon, item )
icon.amountpanel = vgui.Create( "DLabel", icon ) icon.amountpanel = vgui.Create( "DLabel", icon )
icon.amountpanel:SetText( tostring( item.amount ) ) icon.amountpanel:SetText( tostring( item.amount ) .. "x" )
icon.amountpanel:SetTextColor( Color( 205, 205, 205, 255 ) ) icon.amountpanel:SetTextColor( Color( 205, 205, 205, 255 ) )
icon.amountpanel:SetFont( "q_info" ) icon.amountpanel:SetFont( "q_info" )
icon.amountpanel:SizeToContents() icon.amountpanel:SizeToContents()
@ -282,6 +282,17 @@ function menu.open( dt )
resBars[resID].cont.title:SizeToContents() resBars[resID].cont.title:SizeToContents()
resBars[resID].cont.title.w, resBars[resID].cont.title.h = resBars[resID].cont.title:GetSize() resBars[resID].cont.title.w, resBars[resID].cont.title.h = resBars[resID].cont.title:GetSize()
resBars[resID].cont.title:SetPos( resBars[resID].cont.icon.x + resBars[resID].cont.icon.w + padding*2, resBars[resID].cont.icon.y ) resBars[resID].cont.title:SetPos( resBars[resID].cont.icon.x + resBars[resID].cont.icon.w + padding*2, resBars[resID].cont.icon.y )
-- reagents txt
resBars[resID].cont.reagentsTXT = vgui.Create( "DLabel", resBars[resID].cont )
resBars[resID].cont.reagentsTXT:SetText( "Reagents:" )
resBars[resID].cont.reagentsTXT:SetFont( "q_info" )
resBars[resID].cont.reagentsTXT:SetTextColor( Color( 255, 255, 255, 200 ) )
resBars[resID].cont.reagentsTXT:SizeToContents()
resBars[resID].cont.reagentsTXT.w, resBars[resID].cont.reagentsTXT.h = resBars[resID].cont.reagentsTXT:GetSize()
resBars[resID].cont.reagentsTXT:SetPos( resBars[resID].cont.icon.x, resBars[resID].cont.icon.y + resBars[resID].cont.icon.h + padding*5 )
resBars[resID].cont:SetVisible( false ) resBars[resID].cont:SetVisible( false )

@ -13,7 +13,7 @@ Quantum.CharInfoDisplayDistance = 400
Quantum.Rarity = { Quantum.Rarity = {
None = { txt = "gnomerd the mvp", color = Color( 0, 0, 0, 120 ) }, None = { txt = "gnomerd the mvp", color = Color( 0, 0, 0, 120 ) },
Trash = { txt = "Trash", color = Color( 100, 100, 100, 40 ) }, Trash = { txt = "Trash", color = Color( 150, 150, 150, 40 ) },
Common = { txt = "Common", color = Color( 250, 250, 250, 40 ) }, Common = { txt = "Common", color = Color( 250, 250, 250, 40 ) },
Rare = { txt = "Rare", color = Color( 48, 163, 230, 40 ) }, Rare = { txt = "Rare", color = Color( 48, 163, 230, 40 ) },
Epic = { txt = "Epic", color = Color( 220, 90, 90, 40 ) }, Epic = { txt = "Epic", color = Color( 220, 90, 90, 40 ) },

Loading…
Cancel
Save