Advertisement
Guest User

Untitled

a guest
Nov 24th, 2018
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.34 KB | None | 0 0
  1. local function InputHandler(event)
  2. local player = event.PlayerNumber
  3. local MusicWheel = SCREENMAN:GetTopScreen("ScreenSelectMusic"):GetChild("MusicWheel");
  4.   if event.type == "InputEventType_Release" then return false end
  5.     if MusicWheel ~= nil then
  6.       if event.GameButton == "MenuLeft" then
  7.             MusicWheel:Move(-1):Move(0)
  8.         SOUND:PlayOnce(THEME:GetPathS("","_MusicWheel change.ogg"))
  9.       end
  10.       if event.GameButton == "MenuUp" then
  11.                 if MusicWheel:GetSelectedType() == 'WheelItemDataType_Song' then
  12.             MusicWheel:Move(-3):Move(0)
  13.                 else
  14.                     MusicWheel:Move(-1):Move(0)
  15.                 end
  16.         SOUND:PlayOnce(THEME:GetPathS("","_MusicWheel change.ogg"))
  17.       end
  18.       if event.GameButton == "MenuRight" then
  19.         MusicWheel:Move(1):Move(0)
  20.         SOUND:PlayOnce(THEME:GetPathS("","_MusicWheel change.ogg"))
  21.       end
  22.       if event.GameButton == "MenuDown" then
  23.                 if MusicWheel:GetSelectedType() == 'WheelItemDataType_Song' then
  24.             MusicWheel:Move(3):Move(0)
  25.                 else
  26.                     MusicWheel:Move(1):Move(0)
  27.                 end
  28.         SOUND:PlayOnce(THEME:GetPathS("","_MusicWheel change.ogg"))
  29.       end
  30.     end
  31.     end
  32. local t = Def.ActorFrame {
  33.     OnCommand=function(self)
  34.     local MusicWheel = SCREENMAN:GetTopScreen():GetChild("MusicWheel");
  35.     SCREENMAN:GetTopScreen():AddInputCallback(InputHandler)
  36.   end;
  37. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement