Skip to content

Commit

Permalink
Added labels to port and skin selector to make it more obvious what t…
Browse files Browse the repository at this point in the history
…hese panels do.
  • Loading branch information
bkacjios committed Jul 22, 2021
1 parent e38b4db commit c7c24b0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
14 changes: 13 additions & 1 deletion source/modules/gui/panels/core/portselect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ function PANEL:Initialize()
self:MakeAccessor("Port", "m_iPort", 1)

self:DockPadding(1, 1, 1, 1)
self:SetSize(80, 106)
self:SetBorderColor(color_clear)
self:SetBackgroundColor(color(0, 0, 0, 100))

local LABEL = self:Add("Label")
LABEL:SetText("Ports")
LABEL:SetTextAlignment("center")
LABEL:SizeToText()
LABEL:Dock(DOCK_TOP)
LABEL:SetTextColor(color_white)
LABEL:SetShadowDistance(1)
LABEL:SetShadowColor(color_black)
LABEL:SetFont("fonts/melee-bold.otf", 12)
self.LABEL = LABEL

self:SetSize(80, 106 + LABEL:GetHeight() + 5)
self:CenterVertical()

self.PORT_BUTTONS = {}
Expand Down
13 changes: 12 additions & 1 deletion source/modules/gui/panels/core/skinselect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ function PANEL:Initialize()
self:SetBorderColor(color_clear)
self:SetBackgroundColor(color(0, 0, 0, 100))

local LABEL = self:Add("Label")
LABEL:SetText("Themes")
LABEL:SetTextAlignment("center")
LABEL:SizeToText()
LABEL:Dock(DOCK_TOP)
LABEL:SetTextColor(color_white)
LABEL:SetShadowDistance(1)
LABEL:SetShadowColor(color_black)
LABEL:SetFont("fonts/melee-bold.otf", 12)
self.LABEL = LABEL

self.SKIN_BUTTONS = {}
end

Expand All @@ -35,7 +46,7 @@ function PANEL:UpdateSkins()
numskins = numskins + 1
end

self:SetSize(80, 26*numskins + 2)
self:SetSize(80, self.LABEL:GetHeight() + 26*numskins + 7)
self:CenterVertical()
end

Expand Down
4 changes: 2 additions & 2 deletions source/overlay/skins/classic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function SKIN:Paint(controller)
local angle = math.atan2(x, y)
local mag = math.sqrt(x*x + y*y)

local far = mag * 12 -- Higher value = headed towards infinity
local far = mag * 15 -- Higher value = headed towards infinity
local near = mag * 20 -- Higher value = more rotation into the horizon

-- Make the rectangle look like its fading into the horizon
Expand Down Expand Up @@ -279,7 +279,7 @@ function SKIN:Paint(controller)
local mag = math.sqrt(x*x + y*y)

local far = mag * 12
local near = mag * 20
local near = mag * 16

-- Make the rectangle look like its fading into the horizon

Expand Down

0 comments on commit c7c24b0

Please sign in to comment.