Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ece6063

Browse filesBrowse files
committed
Fixed DMenuOption pressed in colors being white-on-white
1 parent 8b04420 commit ece6063
Copy full SHA for ece6063

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎garrysmod/lua/vgui/dmenuoption.lua

Copy file name to clipboardExpand all lines: garrysmod/lua/vgui/dmenuoption.lua
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ function PANEL:PerformLayout( w, h )
155155

156156
end
157157

158+
function PANEL:UpdateColours( skin )
159+
160+
-- If not hovered, but pressed down, choose a different color from the background!
161+
if ( !self.Hovered && ( self:IsDown() || self.m_bSelected ) ) then return self:SetTextStyleColor( skin.Colours.Button.Hover ) end
162+
163+
-- Call the default action
164+
return DButton.UpdateColours( self, skin )
165+
166+
end
167+
158168
function PANEL:GenerateExample()
159169

160170
-- Do nothing!

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.