From 33274c1791a4fbb64df851327a78524b3b1f6a22 Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 22 Oct 2021 23:41:50 -0500 Subject: [PATCH] fix til death score tab nested tab titles being wrong diffusealpha --- .../ScreenSelectMusic decorations/score.lua | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua index befd62edc1..9035d03cfe 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua @@ -888,20 +888,35 @@ local function nestedTabButton(i) self:diffuse(getMainColor("positive")):maxwidth(nestedTabButtonWidth - 80):maxheight(40):zoom(0.65) self:settext(nestedTabs[i]) self:halign(0):valign(1) + self.hoverDiffusefunction = function(self) + local inTabNotHovered = 1 + local offTabNotHovered = 0.6 + local offTabHovered = 0.8 + local inTabHovered = 0.6 + if isOver(self) then + if nestedTab == i then + self:diffusealpha(inTabHovered) + else + self:diffusealpha(offTabHovered) + end + else + if nestedTab == i then + self:diffusealpha(inTabNotHovered) + else + self:diffusealpha(offTabNotHovered) + end + end + end + self:hoverDiffusefunction() end, MouseOverCommand = function(self) - if nestedTab ~= i then - self:diffusealpha(0.8) - else - self:diffusealpha(0.6) - end + self:hoverDiffusefunction() end, MouseOutCommand = function(self) - if nestedTab == i then - self:diffusealpha(1) - else - self:diffusealpha(0.6) - end + self:hoverDiffusefunction() + end, + NestedTabChangedMessageCommand = function(self) + self:hoverDiffusefunction() end, MouseDownCommand = function(self, params) if params.event == "DeviceButton_left mouse button" then