Skip to content

Commit

Permalink
rebirth remove useless themeprefs
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jan 11, 2025
1 parent f231a60 commit f756d7d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 312 deletions.
311 changes: 0 additions & 311 deletions Themes/Rebirth/Scripts/02 ThemePrefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -770,314 +770,3 @@ function StaticBackgrounds()
setmetatable(t, t)
return t
end

function TipType()
local t = {
Name = "TipType",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = true,
ExportOnChange = false,
ExportOnCancel = true,
Choices = {
THEME:GetString("OptionNames", "Off"),
THEME:GetString("OptionNames", "Tips"),
THEME:GetString("OptionNames", "RandomPhrases"),
THEME:GetString("OptionNames", "GradeCounter")
},
LoadSelections = function(self, list, pn)
local pref = themeConfig:get_data().global.TipType
if pref == 1 then
list[1] = true
elseif pref == 2 then
list[2] = true
elseif pref == 3 then
list[3] = true
else -- default to nothing
list[4] = true
end
end,
SaveSelections = function(self, list, pn)
local value
if list[1] == true then
value = 1
elseif list[2] == true then
value = 2
elseif list[3] == true then
value = 3
else -- default to nothing
value = 4
end
themeConfig:get_data().global.TipType = value
themeConfig:set_dirty()
themeConfig:save()
end
}
setmetatable(t, t)
return t
end

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

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

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

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

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

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

function ProgressBar()
local keymode = getCurrentKeyMode()
local t = {
Name = "ProgressBar",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = true,
ExportOnChange = false,
ExportOnCancel = true,
Choices = {THEME:GetString("OptionNames", "Bottom"), THEME:GetString("OptionNames", "Top")},
LoadSelections = function(self, list, pn)
local pref = playerConfig:get_data().GameplayXYCoordinates[keymode].ProgressBarPos
if pref then
list[pref + 1] = true
end
end,
SaveSelections = function(self, list, pn)
local value = playerConfig:get_data().GameplayXYCoordinates[keymode].ProgressBarPos
if list[1] == true then
if value ~= 0 then
value = 0
playerConfig:get_data().GameplayXYCoordinates[keymode].FullProgressBarY = SCREEN_BOTTOM - 30
end
elseif value ~= 1 then
value = 1
playerConfig:get_data().GameplayXYCoordinates[keymode].FullProgressBarY = 20
end
playerConfig:get_data().GameplayXYCoordinates[keymode].ProgressBarPos = value
playerConfig:set_dirty()
playerConfig:save()
end
}
setmetatable(t, t)
return t
end

function NPSWindow()
local t = {
Name = "NPSWindow",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = true,
ExportOnChange = false,
ExportOnCancel = true,
Choices = {"1", "2", "3", "4", "5"},
LoadSelections = function(self, list, pn)
local pref = themeConfig:get_data().NPSDisplay.MaxWindow
if pref then
list[pref] = true
end
end,
SaveSelections = function(self, list, pn)
local value
for k, v in ipairs(list) do
if v then
value = k
end
end
themeConfig:get_data().NPSDisplay.MaxWindow = value
themeConfig:set_dirty()
themeConfig:save()
end
}
setmetatable(t, t)
return t
end
1 change: 0 additions & 1 deletion Themes/Rebirth/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ LineJC="lua,JudgeCounter()"
LineEB="lua,ErrorBar()"
LineEBC="lua,ErrorBarCount()"
LinePI="lua,PlayerInfo()"
LineFBP="lua,ProgressBar()"
LineFB="lua,FullProgressBar()"
LineMB="lua,MiniProgressBar()"
LineLEADB="lua,LeaderBoard()"
Expand Down

0 comments on commit f756d7d

Please sign in to comment.