Skip to content

Commit

Permalink
remove custom smo mp garbage and use a proper mouseclick input callback
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 28, 2018
1 parent 9f1bf36 commit 76c8cb0
Showing 1 changed file with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
local function input(event)
local top = SCREENMAN:GetTopScreen()
if event.DeviceInput.button == "DeviceButton_left mouse button" then
if event.type == "InputEventType_Release" then
if not SCREENMAN:get_input_redirected(PLAYER_1) then
if isOver(top:GetChild("Overlay"):GetChild("PlayerAvatar"):GetChild("Avatar" .. PLAYER_1):GetChild("Image")) then
SCREENMAN:AddNewScreenToTop("ScreenAvatarSwitch")
end
end
end
end
if event.DeviceInput.button == "DeviceButton_left mouse button" and event.type == "InputEventType_Release" then
MESSAGEMAN:Broadcast("MouseLeftClick")
elseif event.DeviceInput.button == "DeviceButton_right mouse button" and event.type == "InputEventType_Release" then
MESSAGEMAN:Broadcast("MouseRightClick")
end
return false
end

local t = Def.ActorFrame {}
if NSMAN:IsETTP() then
t[#t + 1] =
Def.ActorFrame {
LeftClickMessageCommand = function()
MESSAGEMAN:Broadcast("MouseLeftClick")
end
Def.ActorFrame {
BeginCommand = function(self)
MESSAGEMAN:Broadcast("AddMPChatInput")
SCREENMAN:GetTopScreen():AddInputCallback(input)
end,
}
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/default")
return t
end
t[#t + 1] = LoadActor("../_chatbox")
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/profile")
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/msd")
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/songsearch")
t[#t + 1] = LoadActor("tabs")
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/score")
t[#t + 1] = LoadActor("dumbrate")
t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/filters")

local g =
Def.ActorFrame {
Expand Down

0 comments on commit 76c8cb0

Please sign in to comment.