Skip to content

Commit d5c7010

Browse files
TimMenu: improved style of dropdownm
1 parent 1fd1750 commit d5c7010

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

TimMenu/Globals.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Globals.Colors = {
1717
TabSelectedUnderline = { 255, 255, 255, 255 },
1818
WidgetOutline = { 100, 100, 100, 77 },
1919
ArrowBoxBg = { 55, 100, 215, 255 },
20+
DropdownSelected = { 90, 90, 90, 255 },
21+
DropdownSelectedHover = { 110, 110, 110, 255 },
2022
}
2123

2224
-- Style settings

TimMenu/Widgets/Dropdown.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ local function DrawDropdownPopupItem(win, relX, relY, width, itemH, pad, opt, is
4343
draw.SetFont(Globals.Style.Font)
4444
local bgColor = Globals.Colors.Item
4545
if isSelected then
46-
bgColor = Globals.Colors.HighlightActive
46+
bgColor = Globals.Colors.DropdownSelected or Globals.Colors.HighlightActive
4747
end
4848
if isHovered then
49-
bgColor = Globals.Colors.ItemHover
49+
if isSelected then
50+
bgColor = Globals.Colors.DropdownSelectedHover or Globals.Colors.ItemHover
51+
else
52+
bgColor = Globals.Colors.ItemHover
53+
end
5054
end
5155
Common.SetColor(bgColor)
5256
Common.DrawFilledRect(absX, absY, absX + width, absY + itemH)

0 commit comments

Comments
 (0)