Skip to content

Commit

Permalink
hide song related data on wheelitems from the sort mode menu
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 23, 2021
1 parent b7c4fdb commit daf305e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ local function groupActorBuilder()
self:playcommand("UpdateText")
end,
UpdateTextCommand = function(self)
self:visible(not WHEELDATA:inSortModeMenu())
self:settextf("%d Songs (Avg %5.2f)", self.count, self.avg)
end,
SetPositionCommand = function(self)
Expand Down Expand Up @@ -918,6 +919,7 @@ local function groupActorBuilder()
self:diffuse(colorByClearType("Clear"))
end
end
self:visible(not WHEELDATA:inSortModeMenu())
self:settext(lstr)
end,
SetPositionCommand = function(self)
Expand Down
6 changes: 6 additions & 0 deletions Themes/Rebirth/Scripts/10 WheelDataManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ local function sortToString(val)
return sortmodes[val]
end

-- getter for if you are in sortmode menu
-- useful for like 2 things on the wheel
function WHEELDATA.inSortModeMenu(self)
return self.CurrentSort == 0
end

-- mimicing SongUtil::MakeSortString here to keep behavior consistent
function WHEELDATA.makeSortString(s)
local st = s:upper()
Expand Down

0 comments on commit daf305e

Please sign in to comment.