Skip to content

Commit

Permalink
fix rebirth playeroptions screen being completely broken
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 22, 2021
1 parent 878321c commit 265bd82
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 11 deletions.
55 changes: 55 additions & 0 deletions Themes/Rebirth/Languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,61 @@ Failed=Failed
Invalid=Invalid
No Play=No Play

[OptionNames]
SetPercent=Set Percent
PersonalBest=Personal Best
EWMA=EWMA
NPSDisplay=NPS Display
NPSGraph=NPS Graph


[OptionTitles]
ReceptorSize = Receptor Size
CustomizeGameplay= Customize Gameplay
LaneCover=Lane Cover
StaticBG = Background Changes
CBHighlight=CB Highlight
JudgmentText=Judgment Text
JudgmentAnimations=Judgment Animations
ComboText=Combo Text
ComboLabel=Combo Label
DisplayPercent = Current Percent
TargetTracker = Goal Tracker
TargetGoal = Tracker Goal
TargetTrackerMode = Tracker mode
JudgeCounter = Judge Counter
ErrorBar=Error Bar
ErrorBarCount=Error Bar Count
PlayerInfo = Player Info
FullProgressBar = Full Progressbar
MiniProgressBar = Mini Progressbar
Leaderboard = Leaderboard
NPSDisplay=NPS Display

[OptionExplanations]
ReceptorSize = Scale the size of the receptors and notes. This will also indirectly scale your scrolling speed.
CustomizeGameplay= While active, allows you to reposition and resize elements on the gameplay screen to your liking. Any changes will persist through version updates.
LaneCover=Enable lane cover which will cover a portion of the notefield. The height can be adjusted by holding down <Select>+<EffectUp/Down>
StaticBG = Toggle whether or not to allow the background to change.
CBHighlight=Highlights the lane where a combo breaking judgment has occured.
JudgmentText=Toggle whether or not to show the Judgment.
JudgmentAnimations=Toggle judgment animations.
ComboText=Toggle whether or not to show the combo.
ComboLabel=Toggle whether or not to show the combo text next to the number.
DisplayPercent = Displays the current percent for your score.
TargetTracker = Enable Goal Tracker. Displays the differential between your current score and 93% of the maximum score obtainable, or pits you against your personal best.
TargetGoal = Set the percentage goal for the target tracker.
TargetTrackerMode = Toggle tracker mode between a set percentage and your personal best. If no PB is available it will default to your set target goal.
JudgeCounter = Enable Judge Counter. Displays your currently obtained judgment counts. This has a moderate impact on performance. Expect about a 10% penalty to average fps.
ErrorBar = Enable Error Bar. Visual representation of your judgments' deviation from the intended mark. This is about as taxing as the judge counter performance-wise, though more useful. EWMA mode uses the Exponential Weighted Moving Average for its display.
ErrorBarCount = Set the number of bars considered in the Error Bar. If higher than 50, non-EWMA bars begin to persist longer.
ErrorBarLoc = Set the positioning of the error bar to center or bottom.
PlayerInfo = Enable the player info display in the bottom left. This is the most taxing gameplay screen element. Expect a 20% or higher drop in average fps. It's also useless for non-streamers. Advised to disable.
Leaderboard = Displays the top 4 global scores against your current one
FullProgressBar = Displays your progress through the song as well as song title.
MiniProgressBar = Display a smaller, less intrusive, more accessible version of the progress bar placed above the combo text.
NPSDisplay=Toggle whether to display a flying average NPS display. The time window can be set at Theme Options.

[ScreenTitleMenu]
Start=Game Start
PackDownloader=Pack Downloader
Expand Down
8 changes: 8 additions & 0 deletions Themes/Rebirth/Scripts/02 OptionsMenu.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function getPlayerOptionsList(itemSet)
local Items = {
["Main"] = "Speed,RateList,NoteSk,RS,PRAC,CG,ScrollDir,Center,Persp,LC,BG,SF,Background,Judge,Life,Fail,Score",
["Theme"] = "CBHL,JT,JA,CT,CL,DP,TT,TG,TTM,JC,EB,EBC,PI,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
77 changes: 67 additions & 10 deletions Themes/Rebirth/Scripts/02 ThemePrefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,34 @@ function JudgmentText()
return t
end

function JudgmentAnimations()
local t = {
Name = "JudgmentAnimations",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = false,
ExportOnChange = true,
Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")},
LoadSelections = function(self, list, pn)
local pref = playerConfig:get_data().JudgmentTweens
if pref then
list[2] = true
else
list[1] = true
end
end,
SaveSelections = function(self, list, pn)
local value
value = list[2]
playerConfig:get_data().JudgmentTweens = value
playerConfig:set_dirty()
playerConfig:save()
end
}
setmetatable(t, t)
return t
end

function ComboText()
local t = {
Name = "ComboText",
Expand Down Expand Up @@ -177,6 +205,34 @@ function ComboText()
return t
end

function ComboLabel()
local t = {
Name = "ComboLabel",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = false,
ExportOnChange = true,
Choices = {THEME:GetString("OptionNames", "Hide"), THEME:GetString("OptionNames", "Show")},
LoadSelections = function(self, list, pn)
local pref = playerConfig:get_data().ComboLabel
if pref then
list[2] = true
else
list[1] = true
end
end,
SaveSelections = function(self, list, pn)
local value
value = list[2]
playerConfig:get_data().ComboLabel = value
playerConfig:set_dirty()
playerConfig:save()
end
}
setmetatable(t, t)
return t
end

function DisplayPercent()
local t = {
Name = "DisplayPercent",
Expand Down Expand Up @@ -626,32 +682,33 @@ function NPSDisplay()
return t
end

function BackgroundType()
function StaticBackgrounds()
local t = {
Name = "BackgroundType",
Name = "StaticBG",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = true,
ExportOnChange = true,
Choices = {
THEME:GetString("OptionNames", "Default"),
THEME:GetString("OptionNames", "StaticBG"),
THEME:GetString("OptionNames", "RandomBG")
},
LoadSelections = function(self, list, pn)
local pref = playerConfig:get_data().BackgroundType
list[pref] = true
local pref = themeConfig:get_data().global.StaticBackgrounds
if pref then
list[2] = true
else
list[1] = true
end
end,
SaveSelections = function(self, list, pn)
local value
if list[1] then
value = 1
value = false
elseif list[2] then
value = 2
else
value = 3
value = true
end
playerConfig:get_data().BackgroundType = value
playerConfig:get_data().StaticBackgrounds = value
playerConfig:set_dirty()
playerConfig:save()
end
Expand Down
27 changes: 26 additions & 1 deletion Themes/Rebirth/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,32 @@ NextScreen="ScreenTitleMenu"
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"
#Main Page
LineRS="lua,ReceptorSize()"
LineCG="lua,CustomizeGameplay()"
LineLC="lua,LaneCover()"
LineBG="lua,StaticBackgrounds()"
LineSF="lua,OptionRowScreenFilter()"
#--DISABLED: LineCW="lua,CustomEvalWindows()"
# Theme Page
LineCBHL="lua,CBHighlight()"
LineJT="lua,JudgmentText()"
LineJA="lua,JudgmentAnimations()"
LineCT="lua,ComboText()"
LineCL="lua,ComboLabel()"
LineDP="lua,DisplayPercent()"
LineTT="lua,TargetTracker()"
LineTG="lua,TargetGoal()"
LineTTM="lua,TargetTrackerMode()"
LineJC="lua,JudgeCounter()"
LineEB="lua,ErrorBar()"
LineEBC="lua,ErrorBarCount()"
LinePI="lua,PlayerInfo()"
LineFBP="lua,ProgressBar()"
LineFB="lua,FullProgressBar()"
LineMB="lua,MiniProgressBar()"
LineLEADB="lua,LeaderBoard()"
LineNPS="lua,NPSDisplay()"

[ScreenSelectProfile]
ScreenOnCommand=%function(self) self:lockinput(0.2) end
Expand Down

0 comments on commit 265bd82

Please sign in to comment.