From 3a642bc24d728c2fd4395990058b0d1fdd41cbb0 Mon Sep 17 00:00:00 2001 From: ulti_fd Date: Mon, 19 Jul 2021 01:45:18 -0400 Subject: [PATCH] ---PlayerOptions REWORK--- -seperate playeroptions menus (main, theme, and effects) -options reorganized to prioritize important mods -metrics cleanup -language additions and cleanup -granular sudden/hidden offset row (increments of 10%) -downscroll on/off row (scroll row moved to the new effects menu) NOTE: This commit is not yet fully functional. At the moment, a scripts reload is required to make the seperate playeroptions menus function. To be fixed in a future commit before merge. --- .../ScreenPlayerOptions underlay.lua | 7 +- .../ScreenSelectMusic overlay/default.lua | 1 + Themes/Til Death/Languages/en.ini | 2 - Themes/Til Death/Scripts/02 Branches.lua | 6 +- Themes/Til Death/Scripts/02 OptionsMenu.lua | 8 + Themes/Til Death/Scripts/02 ThemePrefs.lua | 2 +- Themes/Til Death/metrics.ini | 114 +++----------- .../ScreenPlayerOptions overlay.lua | 7 +- .../ScreenSelectMusic overlay.lua | 8 + Themes/_fallback/Languages/en.ini | 78 +++++++--- Themes/_fallback/Scripts/02 Branches.lua | 4 +- Themes/_fallback/Scripts/02 OptionsMenu.lua | 54 ++++++- Themes/_fallback/Scripts/02 ThemePrefs.lua | 144 +++++++++++++++++- .../_fallback/Scripts/03 CustomSpeedMods.lua | 8 +- Themes/_fallback/metrics.ini | 128 +++++++--------- Themes/bare-frames/metrics.ini | 5 +- 16 files changed, 369 insertions(+), 207 deletions(-) create mode 100644 Themes/Til Death/Scripts/02 OptionsMenu.lua create mode 100644 Themes/_fallback/BGAnimations/ScreenSelectMusic overlay.lua diff --git a/Themes/Til Death/BGAnimations/ScreenPlayerOptions underlay.lua b/Themes/Til Death/BGAnimations/ScreenPlayerOptions underlay.lua index 0a39bc2c5b..65849e3765 100644 --- a/Themes/Til Death/BGAnimations/ScreenPlayerOptions underlay.lua +++ b/Themes/Til Death/BGAnimations/ScreenPlayerOptions underlay.lua @@ -1,4 +1,9 @@ -t = Def.ActorFrame {} +t = Def.ActorFrame { + InitCommand=function(self) + setenv("DifferentOptionsScreen",false) + setenv("NewOptions","Main") + end +} t[#t + 1] = LoadActor(THEME:GetPathG("", "_OptionsScreen")) .. diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua index bc9f3c493f..63c9946a54 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -28,6 +28,7 @@ local t = self:SetUpdateFunctionInterval(0.025) local s = SCREENMAN:GetTopScreen() s:AddInputCallback(input) + setenv("NewOptions","Main") end } diff --git a/Themes/Til Death/Languages/en.ini b/Themes/Til Death/Languages/en.ini index 69be60c8d5..74076c4074 100644 --- a/Themes/Til Death/Languages/en.ini +++ b/Themes/Til Death/Languages/en.ini @@ -119,8 +119,6 @@ UpdateAvailable=Update Available\nClick to Update 2.95x=2.95x 3.0x=3.0x -reversedownscroll=Reverse (Downscroll) - Bottom=Bottom ClearGradeBackground=Clear+Grade Background EWMA=EWMA diff --git a/Themes/Til Death/Scripts/02 Branches.lua b/Themes/Til Death/Scripts/02 Branches.lua index ae2b4dc302..fb1334b1ee 100644 --- a/Themes/Til Death/Scripts/02 Branches.lua +++ b/Themes/Til Death/Scripts/02 Branches.lua @@ -129,7 +129,7 @@ Branch = { if not IsSMOnlineLoggedIn(PLAYER_1) then return "ScreenNetSelectProfile" else - return "ScreenNetSelectProfile" --return "ScreenNetRoom" -- cant do this, we need to select a local profile even + return "ScreenNetSelectProfile" --return "ScreenNetRoom" -- cant do this, we need to select a local profile even end -- if logged into smo -mina else return "ScreenNetworkOptions" @@ -155,10 +155,10 @@ Branch = { end end, PlayerOptions = function() - if SCREENMAN:GetTopScreen():GetGoToOptions() then + if SCREENMAN:GetTopScreen():GetGoToOptions() or GAMESTATE:Env()["DifferentOptionsScreen"] then return "ScreenPlayerOptions" else - return "ScreenStageInformation" + return ToGameplay() end end, SongOptions = function() diff --git a/Themes/Til Death/Scripts/02 OptionsMenu.lua b/Themes/Til Death/Scripts/02 OptionsMenu.lua new file mode 100644 index 0000000000..ffbb9d80ca --- /dev/null +++ b/Themes/Til Death/Scripts/02 OptionsMenu.lua @@ -0,0 +1,8 @@ +function getPlayerOptionsList(itemSet) + local Items = { + ["Main"] = "Speed,RateList,NoteSk,PRAC,DownSc,Center,Persp,LC,BG,SF,Background,Judge,Life,Fail,Score", + ["Theme"] = "CG,CBHL,JT,CT,DP,TT,TG,TTM,JC,EB,EBC,PI,FBP,FB,MB,LEADB,NPS", + ["Effect"] = "Persp,App,GHO,SHO,Acc,Hide,Effect1,Effect2,Scroll,Turn,Insert,R1,R2,Holds,Mines" + } + return Items[itemSet] .. ",NextScr" +end diff --git a/Themes/Til Death/Scripts/02 ThemePrefs.lua b/Themes/Til Death/Scripts/02 ThemePrefs.lua index 0dff2433ba..440964ae16 100644 --- a/Themes/Til Death/Scripts/02 ThemePrefs.lua +++ b/Themes/Til Death/Scripts/02 ThemePrefs.lua @@ -1236,4 +1236,4 @@ function FadeNoteFieldInSyncMachine() } setmetatable(t, t) return t -end \ No newline at end of file +end diff --git a/Themes/Til Death/metrics.ini b/Themes/Til Death/metrics.ini index 967d71ab34..24be3dce8c 100644 --- a/Themes/Til Death/metrics.ini +++ b/Themes/Til Death/metrics.ini @@ -328,10 +328,17 @@ StepsTypeSetCommand=%function(self,param) \ end; \ [ScreenPlayerOptions] -LineNames="1,Rate,8,RS,CG,PRAC,7,14,4,2,13,5,10,LC,Center,CBHL,JT,CT,DP,TT,TG,TTM,JC,EB,EBC,PI,FBP,FB,MB,LEADB,NPS,16,BG,SF,Background,Life,Judge,Fail,Score" -LineCenter="conf,Center1Player" -LineCG="lua,CustomizeGameplay()" +LineNames=getPlayerOptionsList( getenv("NewOptions") or "Main" ) + +#Main Page LineRS="lua,ReceptorSize()" +LineLC="lua,LaneCover()" +LineBG="lua,BackgroundType()" +LineSF="lua,OptionRowScreenFilter()" +#--DISABLED: LineCW="lua,CustomEvalWindows()" +# Theme Page +LineCG="lua,CustomizeGameplay()" +LineCBHL="lua,CBHighlight()" LineJT="lua,JudgmentText()" LineCT="lua,ComboText()" LineDP="lua,DisplayPercent()" @@ -340,105 +347,24 @@ LineTG="lua,TargetGoal()" LineTTM="lua,TargetTrackerMode()" LineJC="lua,JudgeCounter()" LineEB="lua,ErrorBar()" +LineEBC="lua,ErrorBarCount()" LinePI="lua,PlayerInfo()" LineFBP="lua,ProgressBar()" LineFB="lua,FullProgressBar()" -LineLEADB="lua,LeaderBoard()" LineMB="lua,MiniProgressBar()" -LineSF="lua,OptionRowScreenFilter()" -LineLC="lua,LaneCover()" +LineLEADB="lua,LeaderBoard()" LineNPS="lua,NPSDisplay()" -LineRate="list,Rate" -LineBG="lua,BackgroundType()" -LineFail="list,Fail" -LineScore="list,SaveScores" -LineLife="conf,LifeDifficulty" -LineJudge="conf,TimingWindowScale" -LineCW="lua,CustomEvalWindows()" -LineBackground="conf,BGBrightness" -LineCBHL="lua,CBHighlight()" -LineEBC="lua,ErrorBarCount()" -NextScreen=ToGameplay() +NextScreen=Branch.PlayerOptions() [ScreenOptionsMaster] -EffectsReceptor="4;selectmultiple" -EffectsReceptorDefault="mod,no confusion,no invert,no flip,no xmode" -EffectsReceptor,1="mod,confusion;name,Confusion" -EffectsReceptor,2="mod,invert;name,Invert" -EffectsReceptor,3="mod,Flip;name,Flip" -EffectsReceptor,4="mod,45% xmode;name,XMode" - -Rate="51;together" -RateDefault="mod,1.0xMusic;mod,no haste" -Rate,1="mod,0.5xMusic;name,0.5x" -Rate,2="mod,0.55xMusic;name,0.55x" -Rate,3="mod,0.6xMusic;name,0.6x" -Rate,4="mod,0.65xMusic;name,0.65x" -Rate,5="mod,0.7xMusic;name,0.7x" -Rate,6="mod,0.75xMusic;name,0.75x" -Rate,7="mod,0.8xMusic;name,0.8x" -Rate,8="mod,0.85xMusic;name,0.85x" -Rate,9="mod,0.9xMusic;name,0.9x" -Rate,10="mod,0.95xMusic;name,0.95x" -Rate,11="mod,1.0xMusic;name,1.0x" -Rate,12="mod,1.05xMusic;name,1.05x" -Rate,13="mod,1.1xMusic;name,1.1x" -Rate,14="mod,1.15xMusic;name,1.15x" -Rate,15="mod,1.2xMusic;name,1.2x" -Rate,16="mod,1.25xMusic;name,1.25x" -Rate,17="mod,1.3xMusic;name,1.3x" -Rate,18="mod,1.35xMusic;name,1.35x" -Rate,19="mod,1.4xMusic;name,1.4x" -Rate,20="mod,1.45xMusic;name,1.45x" -Rate,21="mod,1.5xMusic;name,1.5x" -Rate,22="mod,1.55xMusic;name,1.55x" -Rate,23="mod,1.6xMusic;name,1.6x" -Rate,24="mod,1.65xMusic;name,1.65x" -Rate,25="mod,1.7xMusic;name,1.7x" -Rate,26="mod,1.75xMusic;name,1.75x" -Rate,27="mod,1.8xMusic;name,1.8x" -Rate,28="mod,1.85xMusic;name,1.85x" -Rate,29="mod,1.9xMusic;name,1.9x" -Rate,30="mod,1.95xMusic;name,1.95x" -Rate,31="mod,2.0xMusic;name,2.0x" -Rate,32="mod,2.05xMusic;name,2.05x" -Rate,33="mod,2.1xMusic;name,2.1x" -Rate,34="mod,2.15xMusic;name,2.15x" -Rate,35="mod,2.2xMusic;name,2.2x" -Rate,36="mod,2.25xMusic;name,2.25x" -Rate,37="mod,2.3xMusic;name,2.3x" -Rate,38="mod,2.35xMusic;name,2.35x" -Rate,39="mod,2.4xMusic;name,2.4x" -Rate,40="mod,2.45xMusic;name,2.45x" -Rate,41="mod,2.5xMusic;name,2.5x" -Rate,42="mod,2.55xMusic;name,2.55x" -Rate,43="mod,2.6xMusic;name,2.6x" -Rate,44="mod,2.65xMusic;name,2.6x" -Rate,45="mod,2.7xMusic;name,2.7x" -Rate,46="mod,2.75xMusic;name,2.75x" -Rate,47="mod,2.8xMusic;name,2.8x" -Rate,48="mod,2.85xMusic;name,2.85x" -Rate,49="mod,2.9xMusic;name,2.9x" -Rate,50="mod,2.95xMusic;name,2.95x" -Rate,51="mod,3.0xMusic;name,3.0x" - -Scroll="5;selectmultiple" -ScrollDefault="mod,no reverse,no split,no alternate,no cross,no centered" -Scroll,1="mod,reverse;name,reversedownscroll" -Scroll,2="mod,split;name,Split" -Scroll,3="mod,alternate;name,Alternate" -Scroll,4="mod,cross;name,Cross" -Scroll,5="mod,centered;name,Centered" - -Appearance="6;selectmultiple" -AppearanceDefault="mod,no hidden,no hiddenoffset,no sudden,no suddenoffset,no stealth,no blink,no randomvanish" -Appearance,1="mod,hidden;name,Hidden" -Appearance,2="mod,hiddenoffset;name,HiddenOffset" -Appearance,3="mod,sudden;name,Sudden" -Appearance,4="mod,suddenoffset;name,SuddenOffset" -Appearance,5="mod,stealth;name,Stealth" -Appearance,6="mod,blink;name,Blink" +#Appearance="6;selectmultiple" +#AppearanceDefault="mod,no hidden,no hiddenoffset,no sudden,no suddenoffset,no stealth,no blink,no randomvanish" +#Appearance,1="mod,hidden;name,Hidden" +#Appearance,2="mod,hiddenoffset;name,HiddenOffset" +#Appearance,4="mod,suddenoffset;name,SuddenOffset" +#Appearance,5="mod,stealth;name,Stealth" +#Appearance,6="mod,blink;name,Blink" [ScreenEvaluation] # judge changer listener i guess diff --git a/Themes/_fallback/BGAnimations/ScreenPlayerOptions overlay.lua b/Themes/_fallback/BGAnimations/ScreenPlayerOptions overlay.lua index c45dfb8bdf..d6a8e4ac51 100644 --- a/Themes/_fallback/BGAnimations/ScreenPlayerOptions overlay.lua +++ b/Themes/_fallback/BGAnimations/ScreenPlayerOptions overlay.lua @@ -1,4 +1,9 @@ -local t = Def.ActorFrame {} +local t = Def.ActorFrame { + InitCommand=function(self) + setenv("NewOptions","Main") + setenv("DifferentOptionsScreen",false) + end, +} local NSPreviewSize = 0.5 local NSPreviewX = 35 diff --git a/Themes/_fallback/BGAnimations/ScreenSelectMusic overlay.lua b/Themes/_fallback/BGAnimations/ScreenSelectMusic overlay.lua new file mode 100644 index 0000000000..49f9cf02ea --- /dev/null +++ b/Themes/_fallback/BGAnimations/ScreenSelectMusic overlay.lua @@ -0,0 +1,8 @@ +local t = Def.ActorFrame { + InitCommand = function(self) + setenv("NewOptions","Main") + setenv("DifferentOptionsScreen",false) + end +} + +return t diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 3cf6145ba9..237e712525 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -416,6 +416,7 @@ DisplayColorDepth=Choose the color depth of the window. This option may not take DisplayResolution=Choose the output resolution. A higher resolution will show more detail, but requires a faster video card. FullscreenType=Change the Fullscreen type between borderless window and traditional fullscreen. Display Options=BGFit, Appearance and UI options. +DownScroll=Set the scroll direction of the notes. EasterEggs=Enable or disable some special easter eggs. Edit Songs/Steps=Edit Songs/Steps Practice Songs/Steps=Practice Songs/Steps @@ -438,10 +439,13 @@ FastLoadAdditionalSongs=If enabled, don't check songs for changes to Additional FastNoteRendering=If enabled, the Z buffer is not cleared after every note. This causes 3D Noteskins to collide, but substantially improves performance in gameplay. Disabling also enables some extra Noteskin features. Fill Machine Stats= FullTapExplosions = Toggle whether to play the full tap explosion animation on taps. Short means that they instantly end when you release your tap. +FooBar=This is an example explanation. Game=Change the current game type with this option. Get a better editor= Download Arrow Vortex, a powerful and flexible standalone editor that obsoletes the in-game one many times over. GetRankingName=Determines if name entry should never be shown, always be shown, or shown when the course is listed on the high scores screen. Graphics/Sound Options=Change full screen, resolution, and sound options. +GranularHiddenOffset=Change where the arrows become invisible when using Hidden. +GranularSuddenOffset=Change where the arrows become visible when using Sudden. Group= HarshHotLifePenalty=If the life bar is full, and this is on, then a bad judgment means losing at least 10% of full life. HiddenSongs=Some songs are only playable during Oni courses and with roulette. Leave this &oq;OFF&cq; to always display all songs. @@ -489,6 +493,7 @@ PreloadSounds=If YES, preload most sounds in advance. This increases load times Premium=Choose from various premium options. (Coin Mode = Pay) Profile= Export Packages=Export .smzip packages of your installed content. +PONextScreen=Choose whether to go to gameplay or to open another options screen. Profiles=Edit the player profiles stored on this machine. ProgressiveLifebar=Set whether the lifebar is harsher on consecutive boo/miss judgments. OFF for no effect, 8 to make each consecutive miss a multiple of the first miss. ProgressiveStageLifebar=Determine whether the lifebar gets harsher on later stages. LifeDifficulty + this = LifeDifficulty on a final stage. (No effect if Event Mode). @@ -496,7 +501,7 @@ ProTiming=ProTiming RandomBackgroundMode=Choose background style. &oq;Animations&cq; uses random items in the BGAnimations folder. More Options=Access more advanced options here. RandomModifiers= -Rate=Playback rate of the Song. +RateList=Playback rate of the Song. RefreshRate=Controls how many times per second the screen will refresh. Only has an effect when Display Mode is set to &oq;Full Screen&cq;. Reload Songs=Reload all songs and courses. Remove=Remove arrows to make the song easier. @@ -529,7 +534,7 @@ ShowSelectGroup=Toggle whether the Select Group screen is shown. ShowSongOptions=Toggle display of the Song Options screen. When set to ASK, it can be accessed by pressing START a second time after Player Options. ShowStats=Display performance statistics in the upper right corner of the screen and show skips in the lower right corner. FPS = frames per second. TPF = triangles per frame. DPF = draws per frame. SmoothLines=Toggle whether various objects with corners are drawn with antialiased lines. -Center1Player=Turn this option &oq;ON&cq; to center the display for 1 player styles. +Center1Player=Turn on to center the notefield. SongsPerPlay=The number of songs a player can play in Regular mode (if Event Mode is off). SortBySSRNormPercent=Turning this on attempts to show only J4 Grades on the Music Wheel. Game must be restarted when changing this. SoundEffect= @@ -624,33 +629,60 @@ UserPrefScoringMode=Select the scoring mode to be used when not in a course. 100ms=100ms -1=-1 0=0 -0.25x=0.25x -0.3x=0.3x -0.4x=0.4x 0.5x=0.5x +0.55x=0.55x 0.6x=0.6x +0.65x=0.65x 0.7x=0.7x 0.75x=0.75x 0.8x=0.8x +0.85x=0.85x 0.9x=0.9x +0.95x=0.95x 1=1 1.0x=1.0x +1.05x=1.05x 1.1x=1.1x +1.15x=1.15x 1.2x=1.2x 1.25x=1.25x 1.3x=1.3x 1.333x=1.333x +1.35x=1.35x 1.4x=1.4x +1.45x=1.45x 1.5x=1.5x +1.55x=1.55x 1.6x=1.6x +1.65x=1.65x 1.667x=1.667x 1.7x=1.7x 1.75x=1.75x -x1.75=1.75x 1.8x=1.8x +1.85x=1.85x 1.9x=1.9x -x2.25=2.25x -x2.5=2.5x +1.95x=1.95x +2.0x=2.0x +2.05x=2.05x +2.1x=2.1x +2.15x=2.15x +2.2x=2.2x +2.25x=2.25x +2.3x=2.3x +2.35x=2.35x +2.4x=2.4x +2.45x=2.45x +2.5x=2.5x +2.55x=2.55x +2.6x=2.6x +2.65x=2.65x +2.7x=2.7x +2.75x=2.75x +2.8x=2.8x +2.85x=2.85x +2.9x=2.9x +2.95x=2.95x +3.0x=3.0x 10=10 11=11 12=12 @@ -727,8 +759,7 @@ Boost=Boost Both=Both Brake=Brake Bumpy=Bumpy -C150=C150 -C300=C300 +CMod=CMod CPU-Controlled=CPU-Controlled Centered=Centered Choose=Choose @@ -789,6 +820,7 @@ Floored=Floored Free Play=Free Play Force Off=Force Off Force On=Force On +Foo=Foo Full Screen=Full Screen Full=Full Global BGAnimation=Global BGAnimation @@ -820,10 +852,15 @@ Metronome=Metronome Mines=Mines Mini=Mini Mirror=Mirror +MMod=MMod N/A=N/A Native Language=Native Language Never=Never NextRow=&nextrow; +NextGameplay=Gameplay +NextMain=Main Options +NextTheme=Theme Options +NextEffect=Effect Options New=New NewEdit=-New Edit- No=No @@ -865,6 +902,7 @@ Remove=Remove RemoveCombinations=Remove RemoveFeatures=Remove Reverse=Reverse +ReverseDownscroll=Reverse (Downscroll) Right=Right Roll=Roll Romanization=Transliterate @@ -933,16 +971,7 @@ Wave=Wave Wide=Wide Windowed=Windowed Yes=Yes -x0.25=x0.25 -x0.50=x0.50 -x0.75=x0.75 -x1=x1 -x1.5=x1.5 -x2=x2 -x3=x3 -x4=x4 -x5=x5 -x8=x8 +XMod=XMod PercentageScoring=Percentage Scoring Tiny=Tiny @@ -1046,6 +1075,7 @@ DisplayResolution=Display Resolution FullscreenType=Fullscreen Type Display Options=Display Options Duration seconds=Duration seconds +DownScroll=Downscroll EasterEggs=Easter Eggs Edit Songs/Steps=Edit Songs/Steps FastNoteRendering=Fast Note Rendering @@ -1110,11 +1140,14 @@ Force Color 1=Force Color 1 Force Color 2=Force Color 2 Force Effect=Force Effect Force Transition=Force Transition +FooBar=FooBar Freeze=Freeze Game=Game Get a better editor= Get a better editor GetRankingName=Show Name Entry Graphics/Sound Options=Graphics/Sound Options +GranularHiddenOffset=Hidden Offset +GranularSuddenOffset=Sudden Offset Group=Group Hands=Hands HiddenSongs=Hidden Songs @@ -1183,6 +1216,7 @@ Play selection=Play selection Player1Profile=Player1 Profile Player2Profile=Player2 Profile PlayerAutoPlay=AutoPlay +PONextScreen=Next Screen Predicted Meter=Predicted Meter Preferences=Preferences PreloadSounds=Preload Sounds @@ -1201,7 +1235,7 @@ Quads=Quads Quantize=Quantize RandomBackgroundMode=Mode RandomModifiers=Modifiers -Rate=Rate +RateList=Rate Record in selection=Record in selection RefreshRate=Refresh Rate Reload Songs=Reload Songs/Courses @@ -1257,7 +1291,7 @@ Speed segments=Speed segments Starting Time=Starting Time StepMania Credits=StepMania Credits Stops=Stops -Center1Player=Center 1 Player +Center1Player=Center Notefield Song=Song Song Group=Song Group Song Options=Song Options diff --git a/Themes/_fallback/Scripts/02 Branches.lua b/Themes/_fallback/Scripts/02 Branches.lua index 1a53b922d8..3c0329cc2a 100644 --- a/Themes/_fallback/Scripts/02 Branches.lua +++ b/Themes/_fallback/Scripts/02 Branches.lua @@ -172,10 +172,10 @@ Branch = { end end, PlayerOptions = function() - if SCREENMAN:GetTopScreen():GetGoToOptions() then + if SCREENMAN:GetTopScreen():GetGoToOptions() or GAMESTATE:Env()["DifferentOptionsScreen"] then return "ScreenPlayerOptions" else - return "ScreenStageInformation" + return ToGameplay() end end, SongOptions = function() diff --git a/Themes/_fallback/Scripts/02 OptionsMenu.lua b/Themes/_fallback/Scripts/02 OptionsMenu.lua index 464bc497d7..2f640d111f 100644 --- a/Themes/_fallback/Scripts/02 OptionsMenu.lua +++ b/Themes/_fallback/Scripts/02 OptionsMenu.lua @@ -10,7 +10,7 @@ function OptionsRowTest() end return { -- Name is used to retrieve the header and explanation text. - Name = "Foo", + Name = "FooBar", -- Flags for this row. Note that as this table only defines -- a row, not a menu, only row settings can be set here, not -- OptionMenuFlags. @@ -21,7 +21,12 @@ function OptionsRowTest() -- Choices are not resolved as metrics, since they might -- be dynamic. Add THEME Lua hooks if we want to translate -- these. - Choices = {"Option1", "Option2"}, + Choices = { + THEME:GetString("OptionNames","Foo"), + THEME:GetString("OptionNames","Bar"), + }, + -- Or: + -- Choices = {"Option1", "Option2"}, -- Or: -- for i = 1,20 do Choices[i] = "Option " .. i end @@ -128,6 +133,51 @@ function OptionsWeight() return t end +function getPlayerOptionsList(itemSet) + local Items = { + ["Main"] = "Speed,RateList,NoteSk,PRAC,DownSc,Center,Persp,Background,Judge,Life,Fail,Score", + ["Theme"] = "RowTest", + ["Effect"] = "Persp,App,GHO,SHO,Acc,Hide,Effect1,Effect2,Scroll,Turn,Insert,R1,R2,Holds,Mines" + } + return Items[itemSet] .. ",NextScr" +end + +function PONextScreen() + return { + Name = "PONextScreen", + LayoutType = "ShowAllInRow", + SelectType = "SelectOne", + OneChoiceForAllPlayers = true, + Choices = { + THEME:GetString("OptionNames","NextGameplay"), + THEME:GetString("OptionNames","NextMain"), + THEME:GetString("OptionNames","NextTheme"), + THEME:GetString("OptionNames","NextEffect"), + }, + Values = { + ToGameplay(), + "ScreenPlayerOptions", + "ScreenPlayerOptions", + "ScreenPlayerOptions" + }, + LoadSelections = function(self, list, pn) + list[1] = true + end, + SaveSelections = function(self,list) + local entnames = {"Main","Theme","Effect"} + for i,v in ipairs(self.Values) do + if list[i] and i ~= 1 then + setenv("DifferentOptionsScreen",true) + if i > 1 then + setenv("NewOptions", entnames[i-1] ) + end + end + end + end, + } +end + + -- (c) 2005 Glenn Maynard -- All rights reserved. -- diff --git a/Themes/_fallback/Scripts/02 ThemePrefs.lua b/Themes/_fallback/Scripts/02 ThemePrefs.lua index 409451712f..cf92b69e4e 100644 --- a/Themes/_fallback/Scripts/02 ThemePrefs.lua +++ b/Themes/_fallback/Scripts/02 ThemePrefs.lua @@ -190,4 +190,146 @@ function PracticeMode() } setmetatable(t, t) return t -end \ No newline at end of file +end + +function RateList() + local ratelist = {} + do + local startrate = 0.05 + local upperrate = 3.00 + local increment = 0.05 + while startrate <= upperrate do + ratelist[#ratelist+1] = tostring(startrate) .. "x" + startrate = notShit.round(startrate + increment, 2) + end + end + + local t = { + Name = "RateList", + LayoutType = "ShowAllInRow", + SelectType = "SelectOne", + OneChoiceForAllPlayers = false, + ExportOnChange = true, + Choices = ratelist, + LoadSelections = function(self, list, pn) + local rateindex = 1 + local rate = notShit.round(GAMESTATE:GetSongOptionsObject("ModsLevel_Current"):MusicRate(), 2) + local acceptable_delta = 0.025 / 2 + for i = 1, #ratelist do + local r = tonumber(ratelist[i]:sub(1, -2)) + if r == rate or (rate - acceptable_delta <= r and rate + acceptable_delta >= r) then + rateindex = i + break + end + end + list[rateindex] = true + end, + SaveSelections = function(self, list, pn) + for i, v in ipairs(list) do + if v == true then + local r = notShit.round(tonumber(ratelist[i]:sub(1, -2)), 2) + GAMESTATE:GetSongOptionsObject("ModsLevel_Preferred"):MusicRate(r) + GAMESTATE:GetSongOptionsObject("ModsLevel_Song"):MusicRate(r) + GAMESTATE:GetSongOptionsObject("ModsLevel_Current"):MusicRate(r) + break + end + end + end + } + setmetatable(t, t) + return t +end + +function GranularHiddenOffset() + local HOlist = {} + do + local startperc = -50 + local upperperc = 150 + local increment = 10 + while startperc <= upperperc do + HOlist[#HOlist+1] = tostring(startperc) .. "%" + startperc = notShit.round(startperc + increment, 2) + end + end + local t = { + Name = "GranularHiddenOffset", + LayoutType = "ShowAllInRow", + SelectType = "SelectOne", + OneChoiceForAllPlayers = false, + ExportOnChange = true, + Choices = HOlist, + LoadSelections = function(self, list, pn) + local HOindex = 1 + local HiddenOffset = notShit.round(GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Current"):HiddenOffset(), 1) + local acceptable_delta = 0.05 / 2 + for i = 1, #HOlist do + local ho = tonumber(HOlist[i]:sub(1, -2)/100) + if ho == HiddenOffset or (HiddenOffset - acceptable_delta <= ho and HiddenOffset + acceptable_delta >= ho) then + HOindex = i + break + end + end + list[HOindex] = true + end, + SaveSelections = function(self, list, pn) + for i, v in ipairs(list) do + if v == true then + local ho = notShit.round(tonumber(HOlist[i]:sub(1, -2)/100), 2) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Preferred"):HiddenOffset(ho) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Song"):HiddenOffset(ho) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Current"):HiddenOffset(ho) + break + end + end + end + } + setmetatable(t, t) + return t +end + +function GranularSuddenOffset() + local SOlist = {} + do + local startperc = -50 + local upperperc = 150 + local increment = 10 + while startperc <= upperperc do + SOlist[#SOlist+1] = tostring(startperc) .. "%" + startperc = notShit.round(startperc + increment, 2) + end + end + local t = { + Name = "GranularSuddenOffset", + LayoutType = "ShowAllInRow", + SelectType = "SelectOne", + OneChoiceForAllPlayers = false, + ExportOnChange = true, + Choices = SOlist, + LoadSelections = function(self, list, pn) + local SOindex = 1 + local SuddenOffset = notShit.round(GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Current"):SuddenOffset(), 1) + local acceptable_delta = 0.05 / 2 + for i = 1, #SOlist do + local so = tonumber(SOlist[i]:sub(1, -2)/100) + if so == SuddenOffset or (SuddenOffset - acceptable_delta <= so and SuddenOffset + acceptable_delta >= so) then + SOindex = i + break + end + end + list[SOindex] = true + end, + SaveSelections = function(self, list, pn) + for i, v in ipairs(list) do + if v == true then + local so = notShit.round(tonumber(SOlist[i]:sub(1, -2)/100), 2) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Preferred"):SuddenOffset(so) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Song"):SuddenOffset(so) + GAMESTATE:GetPlayerState():GetPlayerOptions("ModsLevel_Current"):SuddenOffset(so) + break + end + end + end + } + setmetatable(t, t) + return t +end diff --git a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua index fc708daaa6..ef6b922270 100644 --- a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua +++ b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua @@ -418,7 +418,7 @@ function ArbitrarySpeedMods() val.speed = math.round(new_val) end elseif real_choice >= 5 then - val.mode = ({"x", "C", "m"})[real_choice - 4] + val.mode = ({"C", "x", "M"})[real_choice - 4] end self:GenChoices() MESSAGEMAN:Broadcast("SpeedChoiceChanged", {pn = pn, mode = val.mode, speed = val.speed}) @@ -447,9 +447,9 @@ function ArbitrarySpeedMods() "+" .. small_inc, "-" .. small_inc, "-" .. big_inc, - "Xmod", - "Cmod", - "Mmod" + THEME:GetString("OptionNames", "CMod"), + THEME:GetString("OptionNames", "XMod"), + THEME:GetString("OptionNames", "MMod"), } -- Insert the status element for P2 first so it will be second for i, pn in ipairs({PLAYER_2, PLAYER_1}) do diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 1fb2fd4e65..3b504360b9 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1622,41 +1622,37 @@ Accel,5="mod,boomerang;name,Boomerang" # Accel,6="mod,boomerang;name,Boomerang" Effect="15;selectmultiple" -EffectDefault="mod,no drunk,no dizzy,,no twirl,no roll,no confusion,no mini,no tiny,no flip,no invert,no tornado,no tipsy,no bumpy,no beat,no xmode" +EffectDefault="mod,no drunk,no dizzy,no twirl,no roll,no confusion,no mini,no tiny,no flip,no invert,no tornado,no tipsy,no bumpy,no beat,no xmode" Effect,1="mod,drunk;name,Drunk" Effect,2="mod,dizzy;name,Dizzy" Effect,3="mod,twirl;name,Twirl" Effect,4="mod,roll;name,Roll" Effect,5="mod,confusion;name,Confusion" -Effect,6="mod,mini;name,Mini" -Effect,7="mod,tiny;name,Tiny" -Effect,8="mod,-100% mini;name,Big" -Effect,9="mod,flip;name,Flip" -Effect,10="mod,invert;name,Invert" -Effect,11="mod,tornado;name,Tornado" +Effect,6="mod,tiny;name,Tiny" +Effect,7="mod,flip;name,Flip" +Effect,8="mod,invert;name,Invert" +Effect,9="mod,tornado;name,Tornado" Effect,12="mod,tipsy;name,Tipsy" Effect,13="mod,bumpy;name,Bumpy" Effect,14="mod,beat;name,Beat" Effect,15="mod,45% xmode;name,XMode" -EffectsReceptor="6;selectmultiple" -EffectsReceptorDefault="mod,no confusion,no invert,no flip,no mini,no xmode" +EffectsReceptor="4;selectmultiple" +EffectsReceptorDefault="mod,no confusion,no invert,no flip,no xmode" EffectsReceptor,1="mod,confusion;name,Confusion" EffectsReceptor,2="mod,invert;name,Invert" EffectsReceptor,3="mod,Flip;name,Flip" -EffectsReceptor,4="mod,mini;name,Mini" -EffectsReceptor,5="mod,-35% mini;name,Big" -EffectsReceptor,6="mod,45% xmode;name,XMode" +EffectsReceptor,4="mod,45% xmode;name,XMode" EffectsArrow="8;selectmultiple" EffectsArrowDefault="mod,no drunk,no dizzy,no twirl,no roll,no beat,no tipsy,no tornado,no bumpy" EffectsArrow,1="mod,drunk;name,Drunk" -EffectsArrow,2="mod,dizzy;name,Dizzy" -EffectsArrow,3="mod,twirl;name,Twirl" -EffectsArrow,4="mod,roll;name,Roll" -EffectsArrow,5="mod,beat;name,Beat" -EffectsArrow,6="mod,tipsy;name,Tipsy" -EffectsArrow,7="mod,50% tornado;name,Tornado" +EffectsArrow,2="mod,50% tornado;name,Tornado" +EffectsArrow,3="mod,tipsy;name,Tipsy" +EffectsArrow,4="mod,dizzy;name,Dizzy" +EffectsArrow,5="mod,twirl;name,Twirl" +EffectsArrow,6="mod,roll;name,Roll" +EffectsArrow,7="mod,beat;name,Beat" EffectsArrow,8="mod,bumpy;name,Bumpy" # Effect="9" @@ -1671,7 +1667,6 @@ EffectsArrow,8="mod,bumpy;name,Bumpy" # Effect,8="mod,tornado;name,Tornado" # Effect,9="mod,tipsy;name,Tipsy" -# XXX: what of hiddenoffset and suddenoffset? Appearance="4;selectmultiple" AppearanceDefault="mod,no hidden,no sudden,no stealth,no blink,no randomvanish" Appearance,1="mod,hidden;name,Hidden" @@ -1744,12 +1739,17 @@ RemoveFeatures,4="mod,nofakes;name,NoFakes" Scroll="5;selectmultiple" ScrollDefault="mod,no reverse,no split,no alternate,no cross,no centered" -Scroll,1="mod,reverse;name,Reverse" +Scroll,1="mod,reverse;name,ReverseDownscroll" Scroll,2="mod,split;name,Split" Scroll,3="mod,alternate;name,Alternate" Scroll,4="mod,cross;name,Cross" Scroll,5="mod,centered;name,Centered" +DownScroll="2;selectone" +DownScrollDefault="mod,no reverse" +DownScroll,1="mod,no reverse;name,Off" +DownScroll,2="mod,reverse;name,On" + # Scroll="5" # ScrollDefault="mod,no reverse,no split,no alternate,no cross" # Scroll,1="name,Standard" @@ -1804,10 +1804,10 @@ Hide,3="mod,80% cover;name,Cover" # Hide,2="mod,dark;name,Dark" # Hide,3="mod,blind;name,Blind" -Persp="5" +Persp="5;selectone" PerspDefault="mod,overhead" -Persp,1="mod,incoming;name,Incoming" -Persp,2="mod,overhead;name,Overhead" +Persp,1="mod,overhead;name,Overhead" +Persp,2="mod,incoming;name,Incoming" Persp,3="mod,space;name,Space" Persp,4="mod,hallway;name,Hallway" Persp,5="mod,distant;name,Distant" @@ -1851,31 +1851,6 @@ Assist,1="mod,no clap,no metronome;name,Off" Assist,2="mod,clap,no metronome;name,Clap" Assist,3="mod,no clap,metronome;name,Metronome" Assist,4="mod,clap,metronome;name,Both" -# -Rate="21;together" -RateDefault="mod,1.0xmusic;mod,no haste" -Rate,1="mod,0.25xmusic;name,0.25x" -Rate,2="mod,0.50xmusic;name,0.5x" -Rate,3="mod,0.75xmusic;name,0.75x" -Rate,4="mod,0.8xmusic;name,0.8x" -Rate,5="mod,0.9xmusic;name,0.9x" -Rate,6="mod,1.0xmusic;name,1.0x" -Rate,7="mod,haste;name,Haste" -Rate,8="mod,1.1xmusic;name,1.1x" -Rate,9="mod,1.2xmusic;name,1.2x" -Rate,10="mod,1.25xmusic;name,1.25x" -Rate,11="mod,1.3xmusic;name,1.3x" -Rate,12="mod,1.333xmusic;name,1.333x" -Rate,13="mod,1.4xmusic;name,1.4x" -Rate,14="mod,1.5xmusic;name,1.5x" -Rate,15="mod,1.6xmusic;name,1.6x" -Rate,16="mod,1.667xmusic;name,1.667x" -Rate,17="mod,1.7xmusic;name,1.7x" -Rate,18="mod,1.75xmusic;name,1.75x" -Rate,19="mod,1.8xmusic;name,1.8x" -Rate,20="mod,1.9xmusic;name,1.9x" -Rate,21="mod,2.0xmusic;name,2.0x" -# AutoAdjust="4;together" AutoAdjustDefault="" AutoAdjust,1="mod,no autosync;name,Off" @@ -2389,36 +2364,49 @@ Fallback="ScreenOptions" Class="ScreenPlayerOptions" # PrevScreen=Branch.BackOutOfPlayerOptions() -NextScreen=Branch.SongOptions() +NextScreen=Branch.PlayerOptions() # PlayMusic=false # TimerSeconds=-1 # -LineNames="1,2,3A,3B,4,5,6,R1,R2,7,8,9,10,11,12,13,14,16" -Line1="lua,ArbitrarySpeedMods()" -# Line1="list,Speed" -Line2="list,Accel" -Line3A="list,EffectsReceptor" -Line3B="list,EffectsArrow" -# -Line4="list,Appearance" -Line5="list,Turn" -Line6="list,Insert" +LineNames=getPlayerOptionsList( getenv("NewOptions") or "Main" ) + +# Main Page +#Line1="list,Speed" +LineSpeed="lua,ArbitrarySpeedMods()" +LinePRAC="lua,PracticeMode()" +LineRateList="lua,RateList()" +LineNoteSk="list,NoteSkins" +LineDownSc="list,DownScroll" +LineCenter="conf,Center1Player" +LineBackground="conf,BGBrightness" +LineJudge="conf,TimingWindowScale" +LineLife="conf,LifeDifficulty" +LineFail="list,Fail" +LineScore="list,SaveScores" +# Theme Page: Only contains an example row since this is fallback! +LineRowTest="lua,OptionsRowTest()" +# Effects Page +LineAcc="list,Accel" +LineEffect1="list,EffectsReceptor" +LineEffect2="list,EffectsArrow" +LineApp="list,Appearance" +LineGHO="lua,GranularHiddenOffset()" +LineSHO="lua,GranularSuddenOffset()" +LinePersp="list,Persp" +LineHide="list,Hide" +LineTurn="list,Turn" +LineInsert="list,Insert" LineR="list,Remove" LineR1="list,RemoveCombinations" LineR2="list,RemoveFeatures" -Line7="list,Scroll" -Line8="list,NoteSkins" -Line9="list,Holds" -Line10="list,Mines" -Line11="list,Attacks" -Line12="list,PlayerAutoPlay" -Line13="list,Hide" -Line14="list,Persp" -Line16="list,Steps" -LinePRAC="lua,PracticeMode()" -# +LineScroll="list,Scroll" +LineHolds="list,Holds" +LineMines="list,Mines" +#LineSteps="list,Steps" + +LineNextScr="lua,PONextScreen()" ExplanationP1OnCommand=shadowlength,1;wrapwidthpixels,375/0.5;zoom,0.5;halign,0;cropright,1;linear,0.5;cropright,0; ExplanationP1X=160 diff --git a/Themes/bare-frames/metrics.ini b/Themes/bare-frames/metrics.ini index a600e91d87..928f1530df 100644 --- a/Themes/bare-frames/metrics.ini +++ b/Themes/bare-frames/metrics.ini @@ -12,9 +12,6 @@ NextScreen="ScreenTitleMenu" [ScreenOptionsService] LineNames="GameType,GraphicSound,KeyConfig,InputOptions,SoundGraphics,Profiles,Network,Advanced" -[ScreenPlayerOptions] -LineNames="1,PRAC,8,2,3A,3B,4,5,6,R1,R2,7,9,10,13,14,16" - [ScreenSelectProfile] ScreenOnCommand=%function(self) self:lockinput(0.2) end @@ -99,4 +96,4 @@ SetNoBpmCommand= SetNormalCommand= SetChangeCommand= SetRandomCommand= -SetExtraCommand= \ No newline at end of file +SetExtraCommand=