In til death you can hold shift and click the random button to go backwards 1 selection. There is not really any reason it is like that.
Also implement this entirely in rebirth
|
InvokeCommand = function(self, params) |
|
if selectable(self:GetName()) then |
|
TOOLTIP:Hide() |
|
local scr = SCREENMAN:GetTopScreen() |
|
if not params or params and params.event == "DeviceButton_left mouse button" then |
|
-- full random |
|
local group = WHEELDATA:GetRandomFolder() |
|
local song = WHEELDATA:GetRandomSongInFolder(group) |
|
scr:GetChild("WheelFile"):playcommand("FindSong", {song = song}) |
|
else |
|
if openedGroup ~= nil and #openedGroup > 0 then |
|
-- random song in group |
|
local song = WHEELDATA:GetRandomSongInFolder(openedGroup) |
|
scr:GetChild("WheelFile"):playcommand("FindSong", {song = song, group = openedGroup}) |
|
else |
|
-- when not in any group, get a random group |
|
local group = WHEELDATA:GetRandomFolder() |
|
scr:GetChild("WheelFile"):playcommand("FindGroup", {group = group}) |
|
end |
|
end |
|
end |
|
end, |
|
MouseDownCommand = function(self, params) |
|
if not visible then return end |
|
if params.event == "DeviceButton_left mouse button" then |
|
if not self:GetParent():GetChild("GroupPage"):IsInvisible() then |
|
-- left clicking the group header gives a random song in the group |
|
local song = WHEELDATA:GetRandomSongInFolder(openedGroup) |
|
self:GetParent():GetParent():GetChild("WheelContainer"):playcommand("FindSong", {song = song, group = openedGroup}) |
|
elseif not self:GetParent():GetChild("MiscPage"):IsInvisible() then |
|
-- left clicking the normal header gives a random group (???) |
|
local group = WHEELDATA:GetRandomFolder() |
|
self:GetParent():GetParent():GetChild("WheelContainer"):playcommand("FindGroup", {group = group}) |
|
end |
|
end |
|
end, |
|
MouseDownCommand = function(self, params) |
|
if params.event == "DeviceButton_left mouse button" then |
|
local w = SCREENMAN:GetTopScreen():GetMusicWheel() |
|
|
|
if INPUTFILTER:IsShiftPressed() and self.lastlastrandom ~= nil then |
|
|
|
-- if the last random song wasnt filtered out, we can select it |
|
-- so end early after jumping to it |
|
if w:SelectSong(self.lastlastrandom) then |
|
return |
|
end |
|
-- otherwise, just pick a new random song |
|
end |
|
|
|
local t = w:GetSongs() |
|
if #t == 0 then return end |
|
local random_song = t[math.random(#t)] |
|
w:SelectSong(random_song) |
|
self.lastlastrandom = self.lastrandom |
|
self.lastrandom = random_song |
|
end |
|
end |
|
MouseDownCommand = function(self, params) |
|
if group_rand ~= "" and params.event == "DeviceButton_left mouse button" then |
|
local w = SCREENMAN:GetTopScreen():GetMusicWheel() |
|
|
|
if INPUTFILTER:IsShiftPressed() and self.lastlastrandom ~= nil then |
|
|
|
-- if the last random song wasnt filtered out, we can select it |
|
-- so end early after jumping to it |
|
if w:SelectSong(self.lastlastrandom) then |
|
return |
|
end |
|
-- otherwise, just pick a new random song |
|
end |
|
|
|
local t = w:GetSongsInGroup(group_rand) |
|
if #t == 0 then return end |
|
local random_song = t[math.random(#t)] |
|
w:SelectSong(random_song) |
|
self.lastlastrandom = self.lastrandom |
|
self.lastrandom = random_song |
|
end |
|
end, |
In til death you can hold shift and click the random button to go backwards 1 selection. There is not really any reason it is like that.
Also implement this entirely in rebirth
etterna/Themes/Rebirth/BGAnimations/playerInfoFrame/main.lua
Lines 1076 to 1097 in b656600
etterna/Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/wheel.lua
Lines 1454 to 1467 in b656600
etterna/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua
Lines 87 to 108 in b656600
etterna/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/currentsort.lua
Lines 66 to 87 in b656600