Skip to content

Commit 563c0a5

Browse files
committed
Relocate and Reimplement Player Options Button
1 parent 436962e commit 563c0a5

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,40 @@ t[#t + 1] =
743743
oldstyle = GAMESTATE:GetCurrentStyle()
744744
end
745745
}
746+
747+
t[#t + 1] =
748+
LoadFont("Common Normal") ..
749+
{
750+
Name = "PlayerOptionsButton",
751+
BeginCommand = function(self)
752+
SCREENMAN:GetTopScreen():AddInputCallback(MPinput)
753+
self:xy(20, 218)
754+
self:zoom(0.5)
755+
self:halign(0)
756+
self:settext("Player Options")
757+
end,
758+
MouseLeftClickMessageCommand = function(self)
759+
if isOver(self) then
760+
SCREENMAN:GetTopScreen():OpenOptions()
761+
end
762+
end
763+
}
764+
765+
--[[ -- This is the Widget Button alternative of the above implementation.
766+
t[#t + 1] =
767+
Widg.Button {
768+
text = "Options",
769+
width = 50,
770+
height = 25,
771+
border = false,
772+
bgColor = BoostColor(getMainColor("frames"), 7.5),
773+
highlight = {color = BoostColor(getMainColor("frames"), 10)},
774+
x = SCREEN_WIDTH / 2,
775+
y = 5,
776+
onClick = function(self)
777+
SCREENMAN:GetTopScreen():OpenOptions()
778+
end
779+
}]]
746780

747781
t[#t + 1] = LoadActor("../_chartpreview.lua")
748782
return t

Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,4 @@ GAMESTATE:UpdateDiscordMenu(
4444
": " .. string.format("%5.2f", GetPlayerOrMachineProfile(PLAYER_1):GetPlayerRating())
4545
)
4646

47-
t[#t + 1] =
48-
Widg.Button {
49-
text = "Options",
50-
width = 50,
51-
height = 25,
52-
border = false,
53-
bgColor = BoostColor(getMainColor("frames"), 7.5),
54-
highlight = {color = BoostColor(getMainColor("frames"), 10)},
55-
x = SCREEN_WIDTH / 2,
56-
y = 5,
57-
onClick = function(self)
58-
SCREENMAN:GetTopScreen():OpenOptions()
59-
end
60-
}
61-
6247
return t

0 commit comments

Comments
 (0)