Skip to content

Commit c7c24b0

Browse files
committed
Added labels to port and skin selector to make it more obvious what these panels do.
1 parent e38b4db commit c7c24b0

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

source/modules/gui/panels/core/portselect.lua

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ function PANEL:Initialize()
88
self:MakeAccessor("Port", "m_iPort", 1)
99

1010
self:DockPadding(1, 1, 1, 1)
11-
self:SetSize(80, 106)
1211
self:SetBorderColor(color_clear)
1312
self:SetBackgroundColor(color(0, 0, 0, 100))
13+
14+
local LABEL = self:Add("Label")
15+
LABEL:SetText("Ports")
16+
LABEL:SetTextAlignment("center")
17+
LABEL:SizeToText()
18+
LABEL:Dock(DOCK_TOP)
19+
LABEL:SetTextColor(color_white)
20+
LABEL:SetShadowDistance(1)
21+
LABEL:SetShadowColor(color_black)
22+
LABEL:SetFont("fonts/melee-bold.otf", 12)
23+
self.LABEL = LABEL
24+
25+
self:SetSize(80, 106 + LABEL:GetHeight() + 5)
1426
self:CenterVertical()
1527

1628
self.PORT_BUTTONS = {}

source/modules/gui/panels/core/skinselect.lua

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ function PANEL:Initialize()
1313
self:SetBorderColor(color_clear)
1414
self:SetBackgroundColor(color(0, 0, 0, 100))
1515

16+
local LABEL = self:Add("Label")
17+
LABEL:SetText("Themes")
18+
LABEL:SetTextAlignment("center")
19+
LABEL:SizeToText()
20+
LABEL:Dock(DOCK_TOP)
21+
LABEL:SetTextColor(color_white)
22+
LABEL:SetShadowDistance(1)
23+
LABEL:SetShadowColor(color_black)
24+
LABEL:SetFont("fonts/melee-bold.otf", 12)
25+
self.LABEL = LABEL
26+
1627
self.SKIN_BUTTONS = {}
1728
end
1829

@@ -35,7 +46,7 @@ function PANEL:UpdateSkins()
3546
numskins = numskins + 1
3647
end
3748

38-
self:SetSize(80, 26*numskins + 2)
49+
self:SetSize(80, self.LABEL:GetHeight() + 26*numskins + 7)
3950
self:CenterVertical()
4051
end
4152

source/overlay/skins/classic.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function SKIN:Paint(controller)
219219
local angle = math.atan2(x, y)
220220
local mag = math.sqrt(x*x + y*y)
221221

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

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

281281
local far = mag * 12
282-
local near = mag * 20
282+
local near = mag * 16
283283

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

0 commit comments

Comments
 (0)