diff --git a/Themes/Til Death/BGAnimations/ScreenNetRoom overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenNetRoom overlay/default.lua index 82545875d7..1fba2ead08 100644 --- a/Themes/Til Death/BGAnimations/ScreenNetRoom overlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenNetRoom overlay/default.lua @@ -22,7 +22,6 @@ local t = Def.ActorFrame { OnCommand = function(self) SCREENMAN:GetTopScreen():AddInputCallback(input) - SCREENMAN:GetTopScreen():UsersVisible(false) end } diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currentsort.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currentsort.lua deleted file mode 100644 index 4fbed1be01..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currentsort.lua +++ /dev/null @@ -1,59 +0,0 @@ -local t = Def.ActorFrame {} - -local frameWidth = 280 -local frameHeight = 20 -local frameX = SCREEN_WIDTH - 5 -local frameY = 15 - -local sortTable = { - SortOrder_Preferred = "Preferred", - SortOrder_Group = "Group", - SortOrder_Title = "Title", - SortOrder_BPM = "BPM", - SortOrder_Popularity = "Popular", - SortOrder_TopGrades = "Grade", - SortOrder_Artist = "Artist", - SortOrder_Genre = "Genre", - SortOrder_ModeMenu = "Mode Menu", - SortOrder_Length = "Song Length", - SortOrder_Recent = "Recently Played", - SortOrder_Favorites = "Favorites" -} - -t[#t + 1] = - Def.Quad { - Name = "CurrentSort", - InitCommand = function(self) - self:xy(frameX, frameY):halign(1):zoomto(frameWidth, frameHeight):diffuse(getMainColor("frames")) - end -} - -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX, frameY + 5):halign(1):zoom(0.55):maxwidth((frameWidth - 40) / 0.35) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - local sort = GAMESTATE:GetSortOrder() - local song = GAMESTATE:GetCurrentSong() - if sort == nil then - self:settext("Sort: ") - elseif sort == "SortOrder_Group" and song ~= nil then - self:settext(song:GetGroupName()) - else - self:settext("Sort: " .. sortTable[sort]) - end - end, - SortOrderChangedMessageCommand = function(self) - self:queuecommand("Set"):diffuse(getMainColor("positive")) - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currenttime.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currenttime.lua deleted file mode 100644 index 381b6ab67c..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/currenttime.lua +++ /dev/null @@ -1,38 +0,0 @@ -local t = Def.ActorFrame {} - -t[#t + 1] = - LoadFont("Common Normal") .. - { - Name = "currentTime", - InitCommand = function(self) - self:xy(SCREEN_WIDTH - 5, SCREEN_BOTTOM - 5):halign(1):valign(1):zoom(0.45) - end - } - -t[#t + 1] = - LoadFont("Common Normal") .. - { - Name = "SessionTime", - InitCommand = function(self) - self:xy(SCREEN_CENTER_X, SCREEN_BOTTOM - 5):halign(0.5):valign(1):zoom(0.45) - end - } - -local function Update(self) - local year = Year() - local month = MonthOfYear() + 1 - local day = DayOfMonth() - local hour = Hour() - local minute = Minute() - local second = Second() - self:GetChild("currentTime"):settextf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second) - - local sessiontime = GAMESTATE:GetSessionTime() - self:GetChild("SessionTime"):settextf("Session Time: " .. SecondsToHHMMSS(sessiontime)) - self:diffuse(getMainColor("positive")) -end - -t.InitCommand = function(self) - self:SetUpdateFunction(Update) -end -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/default.lua deleted file mode 100644 index 5b59bb9975..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/default.lua +++ /dev/null @@ -1,59 +0,0 @@ --- forcibly set the game style to single so we dont crash when loading songs -GAMESTATE:SetCurrentStyle("single") -GAMESTATE:SetCurrentPlayMode("PlayMode_Regular") - ---Input event for mouse clicks -local function input(event) - local top = SCREENMAN:GetTopScreen() - if event.DeviceInput.button == "DeviceButton_left mouse button" then - if event.type == "InputEventType_Release" then - if GAMESTATE:IsPlayerEnabled(PLAYER_1) then - if isOver(top:GetChild("Overlay"):GetChild("PlayerAvatar"):GetChild("Avatar" .. PLAYER_1):GetChild("Image")) then - SCREENMAN:AddNewScreenToTop("ScreenAvatarSwitch") - end - end - if GAMESTATE:IsPlayerEnabled(PLAYER_2) then - if isOver(top:GetChild("Overlay"):GetChild("PlayerAvatar"):GetChild("Avatar" .. PLAYER_2):GetChild("Image")) then - SCREENMAN:AddNewScreenToTop("ScreenAvatarSwitch") - end - end - end - end - return false -end - -local t = - Def.ActorFrame { - OnCommand = function(self) - SCREENMAN:GetTopScreen():AddInputCallback(input) - SCREENMAN:GetTopScreen():UsersVisible(false) - end -} - -t[#t + 1] = - Def.Actor { - CodeMessageCommand = function(self, params) - if params.Name == "AvatarShow" then - SCREENMAN:AddNewScreenToTop("ScreenAvatarSwitch") - end - end -} -t[#t + 1] = LoadActor("../_frame") -t[#t + 1] = LoadActor("../_PlayerInfo") -t[#t + 1] = LoadActor("currentsort") -t[#t + 1] = LoadActor("currenttime") -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(5, 32):halign(0):valign(1):zoom(0.55):diffuse(getMainColor("positive")):maxwidth(SCREEN_WIDTH / 2 - 10):settext( - "Room: " .. (NSMAN:GetCurrentRoomName() or "") - ) - end - } -t[#t + 1] = LoadActor("../_cursor") -t[#t + 1] = LoadActor("../_mouseselect") -t[#t + 1] = LoadActor("../_halppls") -t[#t + 1] = LoadActor("../_userlist") - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/wifesearchbar.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/wifesearchbar.lua deleted file mode 100644 index 7984c3e99f..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectBase overlay/wifesearchbar.lua +++ /dev/null @@ -1,265 +0,0 @@ --- Search functionalities --- to be used in ScreenNetSelectMusic and/or ScreenSelectMusic --- Now uses Til Death's search system - -local searchstring = "" -local englishes = { - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z" -} -local frameX = 10 -local frameY = 180 + capWideScale(get43size(120), 120) -local active = false -local whee -local mouseClickHandled = false - -local function searchInput(event) - if event.type ~= "InputEventType_Release" and active == true then - if event.button == "Back" then - searchstring = "" - whee:SongSearch(searchstring) - resetTabIndex(0) - MESSAGEMAN:Broadcast("TabChanged") - elseif event.button == "Start" then - resetTabIndex(0) - MESSAGEMAN:Broadcast("TabChanged") - elseif event.DeviceInput.button == "DeviceButton_space" then -- add space to the string - searchstring = searchstring .. " " - elseif event.DeviceInput.button == "DeviceButton_backspace" then - searchstring = searchstring:sub(1, -2) -- remove the last element of the string - elseif event.DeviceInput.button == "DeviceButton_delete" then - searchstring = "" - elseif event.DeviceInput.button == "DeviceButton_=" then - searchstring = searchstring .. "=" - else - for i = 1, #englishes do -- add standard characters to string - if event.DeviceInput.button == "DeviceButton_" .. englishes[i] then - searchstring = searchstring .. englishes[i] - end - end - end - MESSAGEMAN:Broadcast("UpdateString") - whee:SongSearch(searchstring) - end -end - -local function DeterminePressed(self, element) - local region_x = self:GetX() + element:GetX() - local region_y = self:GetY() + element:GetY() - local region_width = element:GetZoomedWidth() - local region_height = element:GetZoomedHeight() - - local mouse_x = INPUTFILTER:GetMouseX() - local mouse_y = INPUTFILTER:GetMouseY() - - if - region_x - region_width / 2 <= mouse_x and region_x + region_width / 2 >= mouse_x and - region_y - region_height / 2 <= mouse_y and - region_y + region_height / 2 >= mouse_y - then - return true - else - return false - end -end - -local function UpdateSearchBar(self) - if self == nil then - return - end - if active then - ms.ok("Song search activated") - self:visible(true) - GAMESTATE:GetPlayerState(PLAYER_1):DisableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, true) - MESSAGEMAN:Broadcast("RefreshSearchResults") - else - self:visible(false) - self:queuecommand("Off") - GAMESTATE:GetPlayerState(PLAYER_1):EnableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, false) - end -end - -local t = Def.ActorFrame {} - -t[#t + 1] = - Def.ActorFrame { - LeftClickMessageCommand = function(self, params) - local c = self:GetChildren() - if DeterminePressed(self, c.searchButton) then - if mouseClickHandled == false then - if active == false then - ms.ok("Song search activated") - local c = self:GetChildren() - active = true - GAMESTATE:GetPlayerState(PLAYER_1):DisableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, true) - MESSAGEMAN:Broadcast("RefreshSearchResults") - else - local c = self:GetChildren() - self:finishtweening() - self:queuecommand("Off") - active = false - GAMESTATE:GetPlayerState(PLAYER_1):EnableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, false) - end - mouseClickHandled = true - end - end - return true - end, - LoadActor(THEME:GetPathG("", "SearchBar/searchButton")) .. - { - Name = "searchButton", - InitCommand = function(self) - self:xy((SCREEN_WIDTH / 2) + 50, SCREEN_TOP + 15):setsize(24, 24) - end - } -} - -t[#t + 1] = - Def.ActorFrame { - Name = "SearchBar", - BeginCommand = function(self) - UpdateSearchBar(self) - self:SetUpdateFunction(UpdateSearchBar) - self:SetUpdateRate(1 / 30) - end, - OnCommand = function(self) - local topScreen = SCREENMAN:GetTopScreen() - --whee = topScreen:GetMusicWheel() --Idk why this gives an error - whee = topScreen:GetChild("MusicWheel") - topScreen:AddInputCallback(searchInput) - self:visible(false) - end, - TabChangedMessageCommand = function(self) - if active == false then - ms.ok("Song search activated") - local c = self:GetChildren() - active = true - GAMESTATE:GetPlayerState(PLAYER_1):DisableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, true) - MESSAGEMAN:Broadcast("RefreshSearchResults") - else - local c = self:GetChildren() - self:finishtweening() - self:queuecommand("Off") - active = false - GAMESTATE:GetPlayerState(PLAYER_1):EnableChatboxInput() - SCREENMAN:set_input_redirected(PLAYER_1, false) - end - mouseClickHandled = false - end, - Def.Quad { - InitCommand = function(self) - self:xy(frameX + 20, frameY - 210):zoomto(400, 300):halign(0):valign(0):diffuse(color("#333333CC")) - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 250 - capWideScale(get43size(120), 30), frameY - 90):zoom(0.7):halign(0.5):maxwidth(470) - end, - SetCommand = function(self) - if active then - self:settext("Search Active:") - self:diffuse(getGradeColor("Grade_Tier03")) - else - self:settext("Search Complete:") - self:diffuse(byJudgment("TapNoteScore_Miss")) - end - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 250 - capWideScale(get43size(120), 30), frameY - 50):zoom(0.7):halign(0.5):maxwidth(470):settext( - searchstring - ) - end, - SetCommand = function(self) - self:settext(searchstring) - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 20, frameY - 200):zoom(0.4):halign(0) - end, - SetCommand = function(self) - self:settext("Start to lock search results.") - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 20, frameY - 175):zoom(0.4):halign(0):settext("Back to cancel search.") - end, - SetCommand = function(self) - self:settext("Back to cancel search.") - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 20, frameY - 150):zoom(0.4):halign(0):settext("Delete resets search query.") - end, - SetCommand = function(self) - self:settext("Delete resets search query.") - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(frameX + 20, frameY + 70):zoom(0.5):halign(0):settext("Currently supports standard english alphabet only.") - end, - SetCommand = function(self) - self:settext("Currently supports standard english alphabet only.") - end, - UpdateStringMessageCommand = function(self) - self:queuecommand("Set") - end - } -} - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations.lua new file mode 100644 index 0000000000..623bf6b35e --- /dev/null +++ b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations.lua @@ -0,0 +1,10 @@ +local t = LoadActor("ScreenSelectMusic decorations/default") + t[#t + 1] = + Def.ActorFrame { + BeginCommand = function(self) + MESSAGEMAN:Broadcast("AddMPChatInput") + SCREENMAN:GetTopScreen():AddInputCallback(input)-- not sure if we need this or fallback handles it -mina + end + } + +return t \ No newline at end of file diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/default.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/default.lua deleted file mode 100644 index 192de366de..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/default.lua +++ /dev/null @@ -1,190 +0,0 @@ -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 { - BeginCommand = function(self) - MESSAGEMAN:Broadcast("AddMPChatInput") - SCREENMAN:GetTopScreen():AddInputCallback(input) - end - } - t[#t + 1] = LoadActor("../ScreenSelectMusic decorations/default") - return t -end - -local g = - Def.ActorFrame { - TabChangedMessageCommand = function(self) - local top = SCREENMAN:GetTopScreen() - if getTabIndex() == 0 then - self:visible(true) - top:ChatboxVisible(true) - top:ChatboxInput(true) - else - self:visible(false) - top:ChatboxVisible(false) - top:ChatboxInput(false) - end - end -} - -g[#g + 1] = - Def.Banner { - InitCommand = function(self) - self:x(10):y(60):halign(0):valign(0) - end, - SetMessageCommand = function(self) - local top = SCREENMAN:GetTopScreen() - if top:GetName() == "ScreenSelectMusic" or top:GetName() == "ScreenNetSelectMusic" then - local song = GAMESTATE:GetCurrentSong() - local group = top:GetMusicWheel():GetSelectedSection() - if song then - self:LoadFromSong(song) - elseif group then - self:LoadFromSongGroup(group) - end - end - self:scaletoclipped(capWideScale(get43size(384), 384), capWideScale(get43size(120), 120)) - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end -} -g[#g + 1] = - Def.Quad { - InitCommand = function(self) - self:xy(10, 60 + capWideScale(get43size(120), 120) - capWideScale(get43size(10), 10)):zoomto( - capWideScale(get43size(384), 384), - capWideScale(get43size(20), 20) - ):halign(0):diffuse(color("#000000")):diffusealpha(0.7) - end -} -g[#g + 1] = - LoadFont("Common Normal") .. - { - Name = "songTitle", - InitCommand = function(self) - self:xy(15, 60 + capWideScale(get43size(120), 120) - capWideScale(get43size(10), 10)):visible(true):halign(0):zoom( - capWideScale(get43size(0.45), 0.45) - ):maxwidth(capWideScale(get43size(340), 340) / capWideScale(get43size(0.45), 0.45)) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - local song = GAMESTATE:GetCurrentSong() - if song ~= nil then - self:settext(song:GetDisplayMainTitle() .. " // " .. song:GetDisplayArtist()) - else - self:settext("") - end - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } - -g[#g + 1] = LoadActor("wifeonline") -g[#g + 1] = LoadActor("onlinebpm") -g[#g + 1] = LoadActor("radaronline") - -g[#g + 1] = - Def.ActorFrame { - Name = "StepsDisplay", - InitCommand = function(self) - self:xy(stepsdisplayx, 70):valign(0) - end, - OffCommand = function(self) - self:visible(false) - end, - OnCommand = function(self) - self:visible(true) - end, - TabChangedMessageCommand = function(self) - self:finishtweening() - if getTabIndex() < 3 and GAMESTATE:GetCurrentSong() then - self:playcommand("On") - else - self:playcommand("Off") - end - end, - CurrentSongChangedMessageCommand = function(self) - local song = GAMESTATE:GetCurrentSong() - if song and getTabIndex() < 3 then - self:playcommand("On") - elseif not song then - self:playcommand("Off") - end - end, - PlayingSampleMusicMessageCommand = function(self) - local leaderboardEnabled = - playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).leaderboardEnabled and DLMAN:IsLoggedIn() - if leaderboardEnabled and GAMESTATE:GetCurrentSteps(PLAYER_1) then - local chartkey = GAMESTATE:GetCurrentSteps(PLAYER_1):GetChartKey() - DLMAN:RequestChartLeaderBoardFromOnline( - chartkey, - function(leaderboard) - end - ) - end - end, - ChartPreviewOnMessageCommand = function(self) - self:addx(capWideScale(12, 0)):addy(capWideScale(18, 0)) - end, - ChartPreviewOffMessageCommand = function(self) - self:addx(capWideScale(-12, 0)):addy(capWideScale(-18, 0)) - end, - Def.StepsDisplayList { - Name = "StepsDisplayListRow", - CursorP1 = Def.ActorFrame { - InitCommand = function(self) - self:player(PLAYER_1) - end, - Def.Quad { - InitCommand = function(self) - self:x(54):zoomto(6, 20):halign(1):valign(0.5) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - self:zoomy(20) - end - } - }, - CursorP2 = Def.ActorFrame {}, - CursorP1Frame = Def.Actor { - ChangeCommand = function(self) - self:stoptweening():decelerate(0.05) - end - }, - CursorP2Frame = Def.Actor {} - } -} -t[#t + 1] = g - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/dumbrate.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/dumbrate.lua deleted file mode 100644 index 409310d7c9..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/dumbrate.lua +++ /dev/null @@ -1,177 +0,0 @@ ---A dumb way of getting the rate to update online. -Misterkister - ---Local vars -local update = false -local steps -local song -local frameX = 10 -local frameY = 45 -local frameWidth = capWideScale(320, 400) -local frameHeight = 350 -local fontScale = 0.4 -local distY = 15 -local offsetX = 10 -local offsetY = 20 -local pn = GAMESTATE:GetEnabledPlayers()[1] -local greatest = 0 -local steps -local meter = {} -local curateX = frameX + frameWidth + 5 -local curateY = frameY + offsetY + 140 -meter[1] = 0.00 - ---4:3 ratio. -Misterkister -if not IsUsingWideScreen() == true then - curateX = frameX + frameWidth - 40 - curateY = frameY + offsetY - 20 -end - ---Hacky way of fixing these ratios outside of 16:9 and 4:3. -Misterkister - ---16:10 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.6 then - curateX = frameX + frameWidth - 8 -end - ---5:4 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.25 then - curateX = frameX + frameWidth - 80 -end - ---8:3 ratio targeted. -Misterkister -if round(GetScreenAspectRatio(), 5) > 1.77778 then - curateX = frameX + frameWidth + 425 -end - ---Actor Frame -local t = - Def.ActorFrame { - BeginCommand = function(self) - self:queuecommand("Set"):visible(false) - end, - OffCommand = function(self) - self:bouncebegin(0.2):xy(-500, 0):diffusealpha(0) - end, - OnCommand = function(self) - self:bouncebegin(0.2):xy(0, 0):diffusealpha(1) - end, - SetCommand = function(self) - self:finishtweening() - if getTabIndex() == 0 then - self:queuecommand("On") - self:visible(true) - song = GAMESTATE:GetCurrentSong() - steps = GAMESTATE:GetCurrentSteps(PLAYER_1) - - --Find max MSD value, store MSD values in meter[] - greatest = 0 - if song and steps then - for i = 1, #ms.SkillSets do - meter[i + 1] = steps:GetMSD(getCurRateValue(), i) - if meter[i + 1] > meter[greatest + 1] then - greatest = i - end - end - end - - MESSAGEMAN:Broadcast("UpdateMSDInfo") - update = true - else - self:queuecommand("Off") - update = false - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - TabChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - PlayerJoinedMessageCommand = function(self) - self:queuecommand("Set") - end -} - ---Skillset label function -local function littlebits(i) - local t = - Def.ActorFrame { - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 35, frameY + 120 + 22 * i):halign(0):valign(0):zoom(0.5):maxwidth(110 / 0.6) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - --skillset name - if song and steps then - self:settext(ms.SkillSets[i] .. ":") - else - self:settext("") - end - --highlight - if greatest == i then - self:diffuse(getMainColor("positive")) - else - self:diffuse(getMainColor("negative")) - end - end, - UpdateMSDInfoCommand = function(self) - self:queuecommand("Set") - end - }, - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX + 225, frameY + 120 + 22 * i):halign(1):valign(0):zoom(0.5):maxwidth(110 / 0.6) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and steps then - self:settextf("%05.2f", meter[i + 1]) - self:diffuse(byMSD(meter[i + 1])) - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - UpdateMSDInfoCommand = function(self) - self:queuecommand("Set") - end - } - } - return t -end - --- Music Rate Display -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(curateX, curateY):visible(true):halign(0):zoom(0.35):maxwidth( - capWideScale(get43size(360), 360) / capWideScale(get43size(0.45), 0.45) - ) - end, - SetCommand = function(self) - self:settext(getCurRateDisplayString()) - end, - CodeMessageCommand = function(self, params) - local rate = getCurRateValue() - ChangeMusicRate(rate, params) - self:settext(getCurRateDisplayString()) - end, - RateChangedMessageCommand = function(self, params) - self:settext(getCurRateDisplayString()) - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("set") - end - } - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/onlinebpm.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/onlinebpm.lua deleted file mode 100644 index e539c1de3b..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/onlinebpm.lua +++ /dev/null @@ -1,42 +0,0 @@ ---Merge two files "somethingelseBPMLabel" and "netplayBPMDisplay" into one file. -Misterkister - -local bpmx = SCREEN_CENTER_X + 10 -local bpmy = SCREEN_CENTER_Y + 35 -local displayx = SCREEN_CENTER_X + 45 -local displayy = SCREEN_CENTER_Y + 35 - -if round(GetScreenAspectRatio(), 5) == 1.25 then - bpmx = SCREEN_CENTER_X - displayx = SCREEN_CENTER_X + 35 -end - -local t = Def.ActorFrame {} - -t[#t + 1] = - LoadFont("Common Normal") .. - { - Text = "BPM", - InitCommand = function(self) - self:x(bpmx):y(bpmy):zoom(0.50) - end - } - -t[#t + 1] = - Def.BPMDisplay { - File = THEME:GetPathF("BPMDisplay", "bpm"), - Name = "BPMDisplay", - InitCommand = function(self) - self:x(displayx):y(displayy):zoom(0.50) - end, - SetCommand = function(self) - self:SetFromGameState() - end, - CurrentSongChangedMessageCommand = function(self) - self:playcommand("Set") - end, - CurrentCourseChangedMessageCommand = function(self) - self:playcommand("Set") - end -} - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/radaronline.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/radaronline.lua deleted file mode 100644 index 3bfab5ae75..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/radaronline.lua +++ /dev/null @@ -1,145 +0,0 @@ ---Similar to dummy.lua and I'm just commenting again because I don't know what I am exactly doing. -Misterkister - -local update = false -local t = - Def.ActorFrame { - BeginCommand = function(self) - self:queuecommand("Set"):visible(false) - end, - OffCommand = function(self) - self:bouncebegin(0.2):xy(-500, 0):diffusealpha(0) -- visible(false() - end, - OnCommand = function(self) - self:bouncebegin(0.2):xy(0, 0):diffusealpha(1) - end, - SetCommand = function(self) - self:finishtweening() - if getTabIndex() == 0 then - self:queuecommand("On") - self:visible(true) - update = true - else - self:queuecommand("Off") - update = false - end - end, - TabChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - PlayerJoinedMessageCommand = function(self) - self:queuecommand("Set") - end -} - -local frameX = 10 -local frameY = 45 -local frameWidth = capWideScale(320, 400) -local frameHeight = 350 -local fontScale = 0.4 -local distY = 15 -local offsetX = 10 -local offsetY = 20 -local pn = GAMESTATE:GetEnabledPlayers()[1] - -local cdtitleX = frameX + 440 -local cdtitleY = frameY + 225 - -if not IsUsingWideScreen() == true then - cdtitleX = frameX + 440 - 105 - cdtitleY = frameY + 225 -end - -local stepstuffX = frameX + frameWidth - offsetX - 300 -local stepstuffY = frameY + offsetY - 23 - -if not IsUsingWideScreen() == true then - stepstuffX = frameX + frameWidth - offsetX + 30 - stepstuffY = frameY + offsetY - 13 + 110 -end - -local radarValues = { - {"RadarCategory_Notes", "Notes"}, - {"RadarCategory_TapsAndHolds", "Taps"}, - {"RadarCategory_Jumps", "Jumps"}, - {"RadarCategory_Hands", "Hands"}, - {"RadarCategory_Holds", "Holds"}, - {"RadarCategory_Rolls", "Rolls"}, - {"RadarCategory_Mines", "Mines"} -} - -local radarX = frameX + offsetX + 450 -local stuffstuffstuffX = frameX + offsetX + 400 - -if not IsUsingWideScreen() == true then - radarX = frameX + offsetX + 450 - 120 - stuffstuffstuffX = frameX + offsetX + 400 - 105 -end - ---Hacky way of fixing these ratios outside of 16:9 and 4:3. -Misterkister - ---16:10 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.6 then - radarX = frameX + offsetX + 450 - 45 - stuffstuffstuffX = frameX + offsetX + 400 - 40 -end - ---5:4 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.25 then - radarX = frameX + offsetX + 310 - stuffstuffstuffX = frameX + offsetX + 270 -end - ---8:3 ratio targeted. -Misterkister -if round(GetScreenAspectRatio(), 5) > 1.77778 then - radarX = SCREEN_CENTER_X + 50 - stuffstuffstuffX = SCREEN_CENTER_X -end - -for k, v in ipairs(radarValues) do - t[#t + 1] = - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(stuffstuffstuffX, frameY + offsetY + 230 + (15 * (k - 1))):zoom(0.4):halign(0):maxwidth( - (frameWidth - offsetX * 2 - 150) / 0.4 - ) - end, - OnCommand = function(self) - self:settext(v[2] .. ": ") - end - } - t[#t + 1] = - LoadFont("Common Normal") .. - { - Name = "RadarValue" .. v[1], - InitCommand = function(self) - self:xy(radarX, frameY + offsetY + 230 + (15 * (k - 1))):zoom(0.4):halign(0):maxwidth( - (frameWidth - offsetX * 2 - 150) / 0.4 - ) - end, - SetCommand = function(self) - local song = GAMESTATE:GetCurrentSong() - local steps = GAMESTATE:GetCurrentSteps(pn) - local count = 0 - if song ~= nil and steps ~= nil and update then - count = steps:GetRadarValues(pn):GetValue(v[1]) - self:settext(count) - self:diffuse(color("#FFFFFF")) - else - self:settext(0) - self:diffuse(getMainColor("disabled")) - end - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } -end - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/tabs.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/tabs.lua deleted file mode 100644 index 84835ca735..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/tabs.lua +++ /dev/null @@ -1,152 +0,0 @@ -local active = true - -local CtrlPressed = false -local function input(event) - if event.type ~= "InputEventType_Release" and active then - for i = 1, 6 do - if event.DeviceInput.button == "DeviceButton_" .. i and CtrlPressed == true then - setTabIndex(i - 1) - MESSAGEMAN:Broadcast("TabChanged") - end - end - if event.DeviceInput.button == "DeviceButton_left mouse button" then - MESSAGEMAN:Broadcast("MouseLeftClick") - elseif event.DeviceInput.button == "DeviceButton_right mouse button" then - MESSAGEMAN:Broadcast("MouseRightClick") - end - end - if event.DeviceInput.button == "DeviceButton_left ctrl" then - if event.type == "InputEventType_Release" then - CtrlPressed = false - else - CtrlPressed = true - end - end - if event.DeviceInput.button == "DeviceButton_right ctrl" then - if event.type == "InputEventType_Release" then - CtrlPressed = false - else - CtrlPressed = true - end - end - return false -end - -local t = - Def.ActorFrame { - OnCommand = function(self) - SCREENMAN:GetTopScreen():AddInputCallback(input) - end, - BeginCommand = function(self) - resetTabIndex() - end, - PlayerJoinedMessageCommand = function(self) - resetTabIndex() - end, - BeginningSearchMessageCommand = function(self) - active = true - end, - EndingSearchMessageCommand = function(self) - active = true - end -} - --- Just for debug ---[[ -t[#t+1] = LoadFont("Common Normal") .. { - InitCommand=function(self) - self:xy(300,300):halign(0):zoom(2):diffuse(getMainColor(2)) - end; - BeginCommand=function(self) - self:queuecommand("Set") - end; - SetCommand=function(self) - self:settext(getTabIndex()) - end; - CodeMessageCommand=function(self) - self:queuecommand("Set") - end; -}; ---]] ---====================================================================================== - -local tabNames = {"General", "MSD", "Score", "Search", "Profile", "Filters"} -- this probably should be in tabmanager. - -local frameWidth = (SCREEN_WIDTH * (403 / 854)) / (#tabNames - 1) -local frameX = frameWidth / 2 -local frameY = SCREEN_HEIGHT - 70 - -function tabs(index) - local t = - Def.ActorFrame { - Name = "Tab" .. index, - InitCommand = function(self) - self:xy(frameX + ((index - 1) * frameWidth), frameY) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - self:finishtweening() - self:linear(0.1) - --show tab if it's the currently selected one - if getTabIndex() == index - 1 then - self:y(frameY) - self:diffusealpha(1) - else -- otherwise "Hide" them - self:y(frameY) - self:diffusealpha(0.65) - end - end, - TabChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - PlayerJoinedMessageCommand = function(self) - self:queuecommand("Set") - end - } - - t[#t + 1] = - Def.Quad { - Name = "TabBG", - InitCommand = function(self) - self:y(2):valign(0):zoomto(frameWidth, 20):diffusecolor(getMainColor("frames")):diffusealpha(0.85) - end, - MouseLeftClickMessageCommand = function(self) - if isOver(self) then - setTabIndex(index - 1) - MESSAGEMAN:Broadcast("TabChanged") - end - end - } - - t[#t + 1] = - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:y(5):valign(0):zoom(0.45):diffuse(getMainColor("positive")) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - self:settext(tabNames[index]) - if isTabEnabled(index) then - self:diffuse(getMainColor("positive")) - else - self:diffuse(color("#666666")) - end - end, - PlayerJoinedMessageCommand = function(self) - self:queuecommand("Set") - end - } - return t -end - ---Make tabs -for i = 1, #tabNames do - t[#t + 1] = tabs(i) -end - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/wifeonline.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/wifeonline.lua deleted file mode 100644 index 51ec2a1b7a..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/wifeonline.lua +++ /dev/null @@ -1,697 +0,0 @@ -local profile = PROFILEMAN:GetProfile(PLAYER_1) -local frameX = 10 -local frameY = 250 + capWideScale(get43size(120), 90) -local frameWidth = capWideScale(get43size(455), 455) -local scoreType = themeConfig:get_data().global.DefaultScoreType -local score -local song -local steps -local alreadybroadcasted -local alreadybroadcasted - -local update = false -local t = - Def.ActorFrame { - BeginCommand = function(self) - steps = nil - song = nil - score = nil - self:finishtweening() - if getTabIndex() == 0 then - self:queuecommand("On") - update = true - else - self:queuecommand("Off") - update = false - end - end, - OffCommand = function(self) - self:bouncebegin(0.2):xy(-500, 0):diffusealpha(0) - end, - OnCommand = function(self) - self:bouncebegin(0.2):xy(0, 0):diffusealpha(1) - end, - SetCommand = function(self) - self:finishtweening() - if getTabIndex() == 0 then - self:queuecommand("On") - update = true - else - self:queuecommand("Off") - update = false - end - end, - TabChangedMessageCommand = function(self) - self:queuecommand("Set") - end -} - --- Temporary update control tower; it would be nice if the basic song/step change commands were thorough and explicit and non-redundant -t[#t + 1] = - Def.Actor { - SetCommand = function(self) - if song and not alreadybroadcasted then -- if this is true it means we've just exited a pack's songlist into the packlist - song = GAMESTATE:GetCurrentSong() -- also apprently true if we're tabbing around within a songlist and then stop... - MESSAGEMAN:Broadcast("UpdateChart") -- ms.ok(whee:GetSelectedSection( )) -- use this later to detect pack changes - MESSAGEMAN:Broadcast("RefreshChartInfo") - else - alreadybroadcasted = false - end - end, - CurrentStepsP1ChangedMessageCommand = function(self) - song = GAMESTATE:GetCurrentSong() - MESSAGEMAN:Broadcast("UpdateChart") - alreadybroadcasted = true - end, - CurrentSongChangedMessageCommand = function(self) - if playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).OneShotMirror then -- This will disable mirror when switching songs if OneShotMirror is enabled - local modslevel = topscreen == "ScreenEditOptions" and "ModsLevel_Stage" or "ModsLevel_Preferred" - local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions(modslevel) - playeroptions:Mirror(false) - end - self:queuecommand("Set") - end -} - -local function GetBestScoreByFilter(perc, CurRate) - local rtTable = getRateTable() - if not rtTable then - return nil - end - - local rates = tableKeys(rtTable) - local scores, score - - if CurRate then - local tmp = getCurRateString() - if tmp == "1x" then - tmp = "1.0x" - end - rates = {tmp} - if not rtTable[rates[1]] then - return nil - end - end - - table.sort(rates) - for i = #rates, 1, -1 do - scores = rtTable[rates[i]] - local bestscore = 0 - local index - - for ii = 1, #scores do - score = scores[ii] - if score:ConvertDpToWife() > bestscore then - index = ii - bestscore = score:ConvertDpToWife() - end - end - - if index and scores[index]:GetWifeScore() == 0 and GetPercentDP(scores[index]) > perc * 100 then - return scores[index] - end - - if bestscore > perc then - return scores[index] - end - end -end - -local function GetDisplayScore() - local score - score = GetBestScoreByFilter(0, true) - - if not score then - score = GetBestScoreByFilter(0.9, false) - end - if not score then - score = GetBestScoreByFilter(0.5, false) - end - if not score then - score = GetBestScoreByFilter(0, false) - end - return score -end - -t[#t + 1] = - Def.Actor { - SetCommand = function(self) - if song then - steps = GAMESTATE:GetCurrentSteps(PLAYER_1) - score = GetDisplayScore() - MESSAGEMAN:Broadcast("RefreshChartInfo") - end - end, - UpdateChartMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentRateChangedMessageCommand = function() - score = GetDisplayScore() - end -} - ---All these 4:3 ratio and 16:9 widescreen ratio stuff goes here. -Misterkister ----------------------------------------------------------------------------------------- -local wifeY = frameY - 170 -local wifeX = frameX + 25 -local wifescoretypeX = frameX + 150 -local wifescoretypeY = frameY + 40 -local secondarytypeX = frameX + 130 -local secondarytypeY = frameY + 63 -local secondaryscoretypeX = frameX + 173 -local secondaryscoretypeY = frameY + 63 -local rateX = frameX + 55 -local rateY = frameY + 58 -local datescoreX = frameX + 185 -local datescoreY = frameY + 59 -local maxcomboX = frameX + 185 -local maxcomboY = frameY + 49 -local difficultyX = frameX + 58 -local difficultyY = frameY -local negativebpmX = frameX + 10 -local negativebpmY = frameY - 120 -local infoboxx = 310 -local infoboxy = 200 -local infoboxbar = 3 -local infoboxwidth = 65 -local infoboxheight = 200 -local lengthx = capWideScale(get43size(374), 420) + 60 -local lengthy = capWideScale(get43size(360), 275) -local cdtitlemaxwidth = 75 -local cdtitlemaxheight = 30 -local curateX = 18 -local curateY = SCREEN_BOTTOM - 225 -local cdtitleX = capWideScale(get43size(374), 394) + 60 -local cdtitleY = capWideScale(get43size(290), 270) - ---16:9 ratio. -if IsUsingWideScreen() == true then - wifeY = frameY - 290 - wifeX = frameX + 25 - wifescoretypeX = frameX + 95 - wifescoretypeY = frameY - 290 - secondarytypeX = frameX + 180 - secondarytypeY = frameY - 290 - secondaryscoretypeX = frameX + 245 - secondaryscoretypeY = frameY - 290 - rateX = frameX + 125 - rateY = frameY - 295 - datescoreX = frameX + 170 - datescoreY = frameY - 150 - maxcomboY = frameY - 150 - maxcomboX = frameX + 300 - difficultyY = frameY - 115 - difficultyX = frameX + 440 - negativebpmY = frameY - 150 - --radarX = frameX+400 - - infoboxx = capWideScale(get43size(374), 405) - infoboxy = capWideScale(get43size(360), 215) - infoboxbar = 8 - infoboxwidth = 95 - infoboxheight = 195 - lengthx = capWideScale(get43size(374), 375) - lengthy = capWideScale(get43size(360), 170) - cdtitlemaxwidth = 75 - cdtitlemaxheight = 30 - curateX = 425 - curateY = SCREEN_CENTER_Y - 35 -end - ---4:3 ratio. -if not IsUsingWideScreen() == true then - wifeY = frameY - 170 - wifeX = frameX + 25 - wifescoretypeX = frameX + 95 - wifescoretypeY = frameY - 170 - secondarytypeX = frameX + 25 - secondarytypeY = frameY - 150 - secondaryscoretypeX = frameX + 95 - secondaryscoretypeY = frameY - 150 - rateX = frameX + 145 - rateY = frameY - 175 - datescoreX = frameX + 130 - datescoreY = frameY - 150 - maxcomboY = frameY - 175 - maxcomboX = frameX + 210 - difficultyY = frameY - 95 - difficultyX = frameX + 330 - negativebpmY = frameY - 290 - --radarX = frameX+400 - - infoboxx = 310 - infoboxy = 220 - infoboxbar = 3 - infoboxwidth = 65 - infoboxheight = 175 - lengthx = 290 - lengthy = 142 - cdtitlemaxwidth = 50 - cdtitlemaxheight = 60 - curateX = SCREEN_CENTER_X - 20 - curateY = SCREEN_CENTER_Y - 72 -end - ---Hacky way of fixing these ratios outside of 16:9 and 4:3. I'm not doing 3:4 or 1:1 ratio support unless there's good reasons to do those. -Misterkister - ---16:10 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.6 then - infoboxx = 368 - infoboxy = 215 - difficultyX = frameX + 400 - cdtitleY = capWideScale(get43size(350), 270) - infoboxwidth = 85 - lengthy = capWideScale(get43size(185), 170) -end - ---5:4 ratio. -Misterkister -if round(GetScreenAspectRatio(), 5) == 1.25 then - infoboxx = 285 - infoboxwidth = 58 - difficultyX = frameX + 305 - cdtitleY = capWideScale(get43size(290), 270) - cdtitleX = capWideScale(get43size(344), 394) + 60 - maxcomboX = frameX + 180 - maxcomboY = frameY - 182 -end - ---8:3 ratio targeted. -Misterkister -if round(GetScreenAspectRatio(), 5) > 1.77778 then - infoboxx = SCREEN_CENTER_X - 15 - infoboxy = SCREEN_CENTER_Y - 90 - infoboxwidth = 100 - cdtitleY = SCREEN_CENTER_Y - 25 - cdtitleX = SCREEN_CENTER_X + 25 - infoboxheight = 250 - difficultyX = SCREEN_CENTER_X + 30 - wifeX = SCREEN_CENTER_X - 140 - wifeY = SCREEN_CENTER_Y - 188 - wifescoretypeX = SCREEN_CENTER_X - 50 - wifescoretypeY = SCREEN_CENTER_Y - 188 - secondarytypeX = SCREEN_CENTER_X - 140 - secondarytypeY = SCREEN_CENTER_Y - 158 - secondaryscoretypeX = SCREEN_CENTER_X - 50 - secondaryscoretypeY = SCREEN_CENTER_Y - 158 - lengthx = SCREEN_CENTER_X - 255 - lengthy = SCREEN_CENTER_Y - 70 - maxcomboX = SCREEN_CENTER_X - 160 - maxcomboY = SCREEN_CENTER_Y - 140 - datescoreX = SCREEN_CENTER_X - 160 - datescoreY = SCREEN_CENTER_Y - 120 - rateX = SCREEN_CENTER_X - 145 - rateY = SCREEN_CENTER_Y - 100 -end - -t[#t + 1] = - Def.Quad { - InitCommand = function(self) - self:xy(infoboxx, infoboxy):zoomto(infoboxwidth, infoboxheight):halign(0):valign(0):diffuse(color("#333333CC")):diffusealpha( - 0.66 - ) - end -} -t[#t + 1] = - Def.Quad { - InitCommand = function(self) - self:xy(infoboxx, infoboxy):zoomto(infoboxbar, infoboxheight):halign(0):valign(0):diffuse(getMainColor("highlight")):diffusealpha( - 0.5 - ) - end -} - -t[#t + 1] = - Def.ActorFrame { - -- **score related stuff** These need to be updated with rate changed commands - -- Primary percent score - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(wifeX, wifeY):zoom(0.3):halign(0.5):maxwidth(175):valign(1) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - if score:GetWifeScore() == 0 then - self:settextf("%05.2f%%", notShit.floor(GetPercentDP(score) * 100) / 100) - self:diffuse(getGradeColor(score:GetGrade())) - else - self:settextf("%05.2f%%", notShit.floor(score:GetWifeScore() * 10000) / 100) - self:diffuse(getGradeColor(score:GetWifeGrade())) - end - else - self:settext("") - end - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- Primary ScoreType - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(wifescoretypeX, wifescoretypeY):zoom(0.3):halign(1):valign(1) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - if score:GetWifeScore() == 0 then - self:settext("DP*") - else - self:settext(scoringToText(scoreType)) - end - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- Secondary percent score - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(secondarytypeX, secondarytypeY):zoom(0.6):halign(0.5):maxwidth(125):valign(1) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - if score:GetWifeScore() == 0 then - self:settextf("NA") - self:diffuse(getGradeColor("Grade_Failed")) - else - self:settextf("%05.2f%%", GetPercentDP(score)) - self:diffuse(getGradeColor(score:GetGrade())) - end - else - self:settext("") - end - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- Secondary ScoreType - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(secondaryscoretypeX, secondaryscoretypeY):zoom(0.4):halign(1):valign(1) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - if score:GetWifeScore() == 0 then - self:settext("Wife") - else - self:settext("DP") - end - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- Rate for the displayed score - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(rateX, rateY):zoom(0.5):halign(0.5) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - local rate = getRate(score) - if getCurRateString() ~= rate then - self:settext("(" .. rate .. ")") - else - self:settext(rate) - end - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- Date score achieved on - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(datescoreX, datescoreY):zoom(0.4):halign(0) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - self:settext(score:GetDate()) - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - }, - -- MaxCombo - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(maxcomboX, maxcomboY):zoom(0.4):halign(0) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and score then - self:settextf("Max Combo: %d", score:GetMaxCombo()) - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - } - -- **End score related stuff** -} - --- Difficulty value ("meter"), need to change this later -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(difficultyX, difficultyY):halign(0.5):zoom(0.4):maxwidth(110 / 0.6) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song then - local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 1) - --If meter is showing 0 because it's a solo or a double chart, then don't show the numbers. -Misterkister - if meter == 0 then - self:settext("") - else - self:settextf("%05.2f", meter) - self:diffuse(byMSD(meter)) - end - else - self:settext("") - end - if song and steps:GetTimingData():HasWarps() then - self:settext("") - end - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } - -t[#t + 1] = - Def.Sprite { - InitCommand = function(self) - self:xy(cdtitleX, cdtitleY):halign(0.5):valign(1) - end, - SetCommand = function(self) - self:finishtweening() - if GAMESTATE:GetCurrentSong() then - local song = GAMESTATE:GetCurrentSong() - if song then - if song:HasCDTitle() then - self:visible(true) - self:Load(song:GetCDTitlePath()) - else - self:visible(false) - end - else - self:visible(false) - end - local height = self:GetHeight() - local width = self:GetWidth() - - if height >= cdtitlemaxheight and width >= cdtitlemaxwidth then - if height * (cdtitlemaxwidth / cdtitlemaxheight) >= width then - self:zoom(cdtitlemaxheight / height) - else - self:zoom(cdtitlemaxwidth / width) - end - elseif height >= cdtitlemaxheight then - self:zoom(cdtitlemaxheight / height) - elseif width >= cdtitlemaxwidth then - self:zoom(cdtitlemaxwidth / width) - else - self:zoom(1) - end - else - self:visible(false) - end - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end -} - -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(negativebpmX, negativebpmY):halign(0):zoom(0.25) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song and steps:GetTimingData():HasWarps() then - self:settext("Negative BPMs Detected") - self:diffuse(color("#e61e25")) - else - self:settext("") - end - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - } - ---test actor -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(frameX, frameY - 120):halign(0):zoom(0.4, maxwidth, 125) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - self:settext("") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - } - --- Song duration -t[#t + 1] = - LoadFont("Common Large") .. - { - InitCommand = function(self) - self:xy(lengthx, lengthy):visible(true):halign(1):zoom(capWideScale(get43size(0.4), 0.4)):maxwidth( - capWideScale(get43size(360), 360) / capWideScale(get43size(0.45), 0.45) - ) - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - SetCommand = function(self) - if song then - local playabletime = GetPlayableTime() - self:settext(SecondsToMMSS(playabletime)) - self:diffuse(byMusicLength(playabletime)) - else - self:settext("") - end - end, - CurrentRateChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - RefreshChartInfoMessageCommand = function(self) - self:queuecommand("Set") - end - } -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/yolo.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/yolo.lua deleted file mode 100644 index 6909553e7b..0000000000 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/yolo.lua +++ /dev/null @@ -1,205 +0,0 @@ ---Similar to dummy.lua and I'm just commenting again because I don't know what I am exactly doing. -Misterkister - -local update = false -local t = - Def.ActorFrame { - BeginCommand = function(self) - self:queuecommand("Set"):visible(false) - end, - OffCommand = function(self) - self:bouncebegin(0.2):xy(-500, 0):diffusealpha(0) - end, - OnCommand = function(self) - self:bouncebegin(0.2):xy(0, 0):diffusealpha(1) - end, - SetCommand = function(self) - self:finishtweening() - if getTabIndex() == 0 then - self:queuecommand("On") - self:visible(true) - update = true - else - self:queuecommand("Off") - update = false - end - end, - TabChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - PlayerJoinedMessageCommand = function(self) - self:queuecommand("Set") - end -} - -local frameX = 10 -local frameY = 45 -local frameWidth = capWideScale(320, 400) -local frameHeight = 350 -local fontScale = 0.4 -local distY = 15 -local offsetX = 10 -local offsetY = 20 -local pn = GAMESTATE:GetEnabledPlayers()[1] - -local cdtitleX = frameX + 440 -local cdtitleY = frameY + 225 - -if not IsUsingWideScreen() == true then - cdtitleX = frameX + 440 - 105 - cdtitleY = frameY + 225 -end - -t[#t + 1] = - Def.Sprite { - InitCommand = function(self) - self:xy(cdtitleX, cdtitleY + 10):zoomy(0):valign(1) - end, - Name = "CDTitle", - SetCommand = function(self) - if update then - local song = GAMESTATE:GetCurrentSong() - if song then - if song:HasCDTitle() then - self:visible(true) - self:Load(song:GetCDTitlePath()) - else - self:visible(false) - end - else - self:visible(false) - end - local height = self:GetHeight() - local width = self:GetWidth() - - if height >= 80 and width >= 100 then - if height * (100 / 80) >= width then - self:zoom(80 / height) - else - self:zoom(100 / width) - end - elseif height >= 80 then - self:zoom(80 / height) - elseif width >= 100 then - self:zoom(100 / width) - else - self:zoom(1) - end - self:diffusealpha(1) - end - end, - BeginCommand = function(self) - self:queuecommand("Set") - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end -} - -local stepstuffX = frameX + frameWidth - offsetX - 300 -local stepstuffY = frameY + offsetY - 23 - -if not IsUsingWideScreen() == true then - stepstuffX = frameX + frameWidth - offsetX + 30 - stepstuffY = frameY + offsetY - 13 + 110 -end - -t[#t + 1] = - LoadFont("Common Normal") .. - { - Name = "StepsAndMeter", - InitCommand = function(self) - self:xy(stepstuffX, stepstuffY):zoom(0.4):halign(1) - end, - SetCommand = function(self) - local steps = GAMESTATE:GetCurrentSteps(pn) - local song = GAMESTATE:GetCurrentSong() - local notecount = 0 - local length = 1 - if steps ~= nil and song ~= nil and update then - length = song:GetStepsSeconds() - notecount = steps:GetRadarValues(pn):GetValue("RadarCategory_Notes") - self:settext(string.format("%0.2f Average NPS", notecount / length)) - self:diffuse(Saturation(getDifficultyColor(GetCustomDifficulty(steps:GetStepsType(), steps:GetDifficulty())), 0.3)) - else - self:settext("0.00 Average NPS") - end - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } - -local radarValues = { - {"RadarCategory_Notes", "Notes"}, - {"RadarCategory_TapsAndHolds", "Taps"}, - {"RadarCategory_Jumps", "Jumps"}, - {"RadarCategory_Hands", "Hands"}, - {"RadarCategory_Holds", "Holds"}, - {"RadarCategory_Rolls", "Rolls"}, - {"RadarCategory_Mines", "Mines"}, - {"RadarCategory_Lifts", "Lifts"}, - {"RadarCategory_Fakes", "Fakes"} -} - -local radarX = frameX + offsetX + 450 -local stuffstuffstuffX = frameX + offsetX + 400 - -if not IsUsingWideScreen() == true then - radarX = frameX + offsetX + 450 - 120 - stuffstuffstuffX = frameX + offsetX + 400 - 110 -end - -for k, v in ipairs(radarValues) do - t[#t + 1] = - LoadFont("Common Normal") .. - { - InitCommand = function(self) - self:xy(stuffstuffstuffX, frameY + offsetY + 230 + (15 * (k - 1))):zoom(0.4):halign(0):maxwidth( - (frameWidth - offsetX * 2 - 150) / 0.4 - ) - end, - OnCommand = function(self) - self:settext(v[2] .. ": ") - end - } - t[#t + 1] = - LoadFont("Common Normal") .. - { - Name = "RadarValue" .. v[1], - InitCommand = function(self) - self:xy(radarX, frameY + offsetY + 230 + (15 * (k - 1))):zoom(0.4):halign(0):maxwidth( - (frameWidth - offsetX * 2 - 150) / 0.4 - ) - end, - SetCommand = function(self) - local song = GAMESTATE:GetCurrentSong() - local steps = GAMESTATE:GetCurrentSteps(pn) - local count = 0 - if song ~= nil and steps ~= nil and update then - count = steps:GetRadarValues(pn):GetValue(v[1]) - self:settext(count) - self:diffuse(color("#FFFFFF")) - else - self:settext(0) - self:diffuse(getMainColor("disabled")) - end - end, - CurrentSongChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP1ChangedMessageCommand = function(self) - self:queuecommand("Set") - end, - CurrentStepsP2ChangedMessageCommand = function(self) - self:queuecommand("Set") - end - } -end - -return t diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic overlay.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic overlay.lua new file mode 100644 index 0000000000..7ad27cd03b --- /dev/null +++ b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic overlay.lua @@ -0,0 +1,3 @@ +local t = LoadActor("ScreenSelectMusic overlay/default") +t[#t+1] = LoadActor("_userlist") +return t \ No newline at end of file diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua index 36ddf0d4c6..c016bf51fe 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -1,14 +1,4 @@ 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 @@ -22,9 +12,6 @@ local t = BeginCommand = function(self) local s = SCREENMAN:GetTopScreen() s:AddInputCallback(input) - if s:GetName() == "ScreenNetSelectMusic" then - s:UsersVisible(false) - end end } diff --git a/Themes/Til Death/BGAnimations/_PlayerInfo.lua b/Themes/Til Death/BGAnimations/_PlayerInfo.lua index e7361a3e25..74e1425720 100644 --- a/Themes/Til Death/BGAnimations/_PlayerInfo.lua +++ b/Themes/Til Death/BGAnimations/_PlayerInfo.lua @@ -74,6 +74,12 @@ t[#t + 1] = self:finishtweening() self:Load(getAvatarPath(PLAYER_1)) self:zoomto(50, 50) + end, + MouseLeftClickMessageCommand = function(self) + if isOver(self) and not SCREENMAN:get_input_redirected(PLAYER_1) then + local top = SCREENMAN:GetTopScreen() + SCREENMAN:AddNewScreenToTop("ScreenAvatarSwitch") + end end }, LoadFont("Common Normal") .. diff --git a/Themes/Til Death/BGAnimations/_userlist.lua b/Themes/Til Death/BGAnimations/_userlist.lua index 8832405a68..16fd5d25bd 100644 --- a/Themes/Til Death/BGAnimations/_userlist.lua +++ b/Themes/Til Death/BGAnimations/_userlist.lua @@ -1,4 +1,4 @@ -local usersZoom = 0.35 +local usersZoom = 0.45 local usersWidth = 50 local usersWidthSmall = 25 local usersWidthZoom = 50 * (1 / usersZoom)