diff --git a/Themes/Rebirth/BGAnimations/ScreenEvaluation underlay/default.lua b/Themes/Rebirth/BGAnimations/ScreenEvaluation underlay/default.lua index ed81522ece..a8e25d9e26 100644 --- a/Themes/Rebirth/BGAnimations/ScreenEvaluation underlay/default.lua +++ b/Themes/Rebirth/BGAnimations/ScreenEvaluation underlay/default.lua @@ -1,6 +1,7 @@ -- reset context manager as early as possible in the evaluation init process -- this should be a safe place to do it, between all context manager registrations (if they exist) CONTEXTMAN:Reset() +local showbg = function() return PREFSMAN:GetPreference("ShowBackgrounds") end local t = Def.ActorFrame { Name = "UnderlayFile", @@ -19,7 +20,7 @@ t[#t+1] = Def.Sprite { end, SetCommand = function(self, params) self:finishtweening() - if params.song and params.song:GetBackgroundPath() then + if params.song and params.song:GetBackgroundPath() and showbg() then self:visible(true) self:LoadBackground(params.song:GetBackgroundPath()) self:scaletocover(0, 0, SCREEN_WIDTH, SCREEN_BOTTOM) diff --git a/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua b/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua index 89cb1a0bac..2219be1f4c 100644 --- a/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua +++ b/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua @@ -33,19 +33,4 @@ else songoptions:RandomBGOnly(false) end -local showbgs = themeConfig:get_data().global.ShowBackgrounds -if not showbgs then - return Def.ActorFrame { - Def.Quad { - Name = "SCUFFEDBACKGROUND", - InitCommand = function(self) - self:valign(0):halign(0) - self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT) - self:diffuse(color("#000000")) - self:diffusealpha(1) - end, - }, - } -end - return Def.ActorFrame {} \ No newline at end of file diff --git a/Themes/Rebirth/BGAnimations/ScreenSelectMusic underlay/default.lua b/Themes/Rebirth/BGAnimations/ScreenSelectMusic underlay/default.lua index fcf9855c38..23c379251c 100644 --- a/Themes/Rebirth/BGAnimations/ScreenSelectMusic underlay/default.lua +++ b/Themes/Rebirth/BGAnimations/ScreenSelectMusic underlay/default.lua @@ -1,4 +1,4 @@ -local showbg = function() return themeConfig:get_data().global.ShowBackgrounds end +local showbg = function() return PREFSMAN:GetPreference("ShowBackgrounds") end local avgcolorbg = function() return themeConfig:get_data().global.FallbackToAverageColorBG end local t = Def.ActorFrame { Name = "UnderlayFile", diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua index d52196fac0..58d3e2d82e 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua @@ -3231,7 +3231,7 @@ local function rightFrame() }, wheelPosition = themeoption("global", "WheelPosition"), wheelBanners = themeoption("global", "WheelBanners"), - showBackgrounds = themeoption("global", "ShowBackgrounds"), + showBackgrounds = PREFSMAN:GetPreference("ShowBackgrounds"), useSingleColorBG = themeoption("global", "FallbackToAverageColorBG"), showVisualizer = themeoption("global", "ShowVisualizer"), tipType = themeoption("global", "TipType"), @@ -5654,8 +5654,8 @@ local function rightFrame() Type = "SingleChoice", Explanation = translations["ShowBGsExplanation"], Choices = choiceSkeleton("Yes", "No"), - Directions = optionDataToggleDirectionsFUNC("showBackgrounds", true, false), - ChoiceIndexGetter = optionDataToggleIndexGetterFUNC("showBackgrounds", true), + Directions = preferenceToggleDirections("ShowBackgrounds", true, false), + ChoiceIndexGetter = preferenceToggleIndexGetter("ShowBackgrounds", true), }, { Name = "BG Fallback to Banner Color", diff --git a/Themes/Rebirth/Scripts/01 theme_config.lua b/Themes/Rebirth/Scripts/01 theme_config.lua index b93eca2f37..dc21d5648c 100644 --- a/Themes/Rebirth/Scripts/01 theme_config.lua +++ b/Themes/Rebirth/Scripts/01 theme_config.lua @@ -2,7 +2,6 @@ local defaultConfig = { global = { TipType = 1, -- 1 = tips, 2 = quotes ... ShowVisualizer = true, - ShowBackgrounds = true, -- wheel and gameplay bg FallbackToAverageColorBG = true, -- wheel bg only StaticBackgrounds = false, VideoBanners = true, diff --git a/Themes/Rebirth/Scripts/02 ThemePrefs.lua b/Themes/Rebirth/Scripts/02 ThemePrefs.lua index 0354d37da3..90ed9d8a91 100644 --- a/Themes/Rebirth/Scripts/02 ThemePrefs.lua +++ b/Themes/Rebirth/Scripts/02 ThemePrefs.lua @@ -801,70 +801,6 @@ function TipType() return t end -function SongBGEnabled() - local t = { - Name = "SongBGEnabled", - LayoutType = "ShowAllInRow", - SelectType = "SelectOne", - OneChoiceForAllPlayers = true, - ExportOnChange = true, - Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")}, - LoadSelections = function(self, list, pn) - local pref = themeConfig:get_data().global.SongBGEnabled - 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.SongBGEnabled = value - themeConfig:set_dirty() - themeConfig:save() - end - } - setmetatable(t, t) - return t -end - -function SongBGMouseEnabled() - local t = { - Name = "SongBGMouseEnabled", - LayoutType = "ShowAllInRow", - SelectType = "SelectOne", - OneChoiceForAllPlayers = true, - ExportOnChange = true, - Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")}, - LoadSelections = function(self, list, pn) - local pref = themeConfig:get_data().global.SongBGMouseEnabled - 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.SongBGMouseEnabled = value - themeConfig:set_dirty() - themeConfig:save() - end - } - setmetatable(t, t) - return t -end - function EvalBGType() local t = { Name = "EvalBGType", diff --git a/Themes/Til Death/BGAnimations/ScreenEvaluation underlay.lua b/Themes/Til Death/BGAnimations/ScreenEvaluation underlay.lua index dabcae0a99..ce172202b1 100644 --- a/Themes/Til Death/BGAnimations/ScreenEvaluation underlay.lua +++ b/Themes/Til Death/BGAnimations/ScreenEvaluation underlay.lua @@ -1,4 +1,4 @@ -local enabled = themeConfig:get_data().global.SongBGEnabled +local enabled = PREFSMAN:GetPreference("ShowBackgrounds") local brightness = 0.4 local t = Def.ActorFrame {} diff --git a/Themes/Til Death/BGAnimations/_songbg.lua b/Themes/Til Death/BGAnimations/_songbg.lua index e3bee40568..a79f1738a6 100644 --- a/Themes/Til Death/BGAnimations/_songbg.lua +++ b/Themes/Til Death/BGAnimations/_songbg.lua @@ -1,4 +1,4 @@ -local enabled = themeConfig:get_data().global.SongBGEnabled +local enabled = PREFSMAN:GetPreference("ShowBackgrounds") local brightness = 0.3 local t = Def.ActorFrame {} diff --git a/Themes/Til Death/Languages/de.ini b/Themes/Til Death/Languages/de.ini index 6a2b677ffb..6d3aa243c0 100644 --- a/Themes/Til Death/Languages/de.ini +++ b/Themes/Til Death/Languages/de.ini @@ -121,9 +121,7 @@ NPSDisplay=NPS Anzeige DefaultScoreType=Standard Ergebnisart TipType=Tipps -SongBGEnabled=Lied-Hintergründe EvalBGType=Evaluationshintergrundart -SongBGMouseEnabled=Hintergrund bewegen Particles=Partikeleffekte RateSort=Sortierung nach Rate HelpMenu=Hilfsmenü @@ -162,9 +160,7 @@ Avatars=Avatar setzen DefaultScoreType=Standard Ergebnisart TipType=Zeigt entweder Tipps, Zitate oder keines von beidem. -SongBGEnabled=Schaltet den Liedhintergrund Ein/Aus. Kann mittleres Ruckeln verursachen. EvalBGType=Art des Hintergrundes für den Ergebnisbildschirm. -SongBGMouseEnabled=Erlaubt es den Hintergrund mit der Maus zu bewegen. Particles=Partikeleffekte RateSort=Ergebnise werden nach Rate sortiert. diff --git a/Themes/Til Death/Languages/en.ini b/Themes/Til Death/Languages/en.ini index 739bb32171..8f1a496771 100644 --- a/Themes/Til Death/Languages/en.ini +++ b/Themes/Til Death/Languages/en.ini @@ -168,9 +168,7 @@ NPSDisplay=NPS Display DefaultScoreType = Default ScoreType TipType = Tip Type -SongBGEnabled = Show Background EvalBGType = Eval Background Type -SongBGMouseEnabled = Move Background Particles = Particles RateSort = RateSort HelpMenu = Help Menu @@ -219,9 +217,7 @@ ShowPlayerOptionsHint=Turn this off to disable the bright hint that tells you to DefaultScoreType = Default ScoreType TipType = Sets the Tiptype to either display tips or random quotes and phrases or nothing at all. -SongBGEnabled = Toggle whether to show the song's background image or not on the select and the eval screen. Turn this off if you experience stutter or lag while scrolling through songs. EvalBGType = Set the type of background to show for ScreenEvaluation. -SongBGMouseEnabled = Toggle whether to enable the moving of the background image with the mouse. Particles = Toggle whether to show particles or not for certain screens. RateSort = If enabled, the scores will be sorted for different rate mod that was used. diff --git a/Themes/Til Death/Languages/zh.ini b/Themes/Til Death/Languages/zh.ini index 1da6c760c6..a1e837c798 100644 --- a/Themes/Til Death/Languages/zh.ini +++ b/Themes/Til Death/Languages/zh.ini @@ -169,9 +169,7 @@ NPSDisplay=NPS窗口 DefaultScoreType = 默認分數類型 TipType = 小貼士類型 -SongBGEnabled = 歌曲背景圖片 EvalBGType = 結算背景樣式 -SongBGMouseEnabled = 移動背景圖片 Particles = 粒子特效 RateSort = 播放速率排列 HelpMenu = 幫助菜單 @@ -212,9 +210,7 @@ Avatars=設置頭像. 此項是臨時的. DefaultScoreType = 設定默認分數類型. TipType = 設定小貼士的類型, 可選顯示幫助提示, 隨機語句或是關閉. -SongBGEnabled = 選擇是否在選歌界面和結算界面顯示歌曲背景圖片. 如果在選擇歌曲時有明顯卡頓, 建議關閉背景顯示. EvalBGType = 設定在結算界面顯示的背景. -SongBGMouseEnabled = 選擇是否開啟可用鼠標移動背景圖片的功能. Particles = 選擇是否在某些界面開啟粒子特效. RateSort = 選擇是否開啟播放速率排列. 開啟時會將不同播放速率下的成績區分開. diff --git a/Themes/Til Death/Scripts/01 theme_config.lua b/Themes/Til Death/Scripts/01 theme_config.lua index 2898d8a066..76828ecdda 100644 --- a/Themes/Til Death/Scripts/01 theme_config.lua +++ b/Themes/Til Death/Scripts/01 theme_config.lua @@ -3,9 +3,6 @@ local defaultConfig = { DefaultScoreType = 4, -- refer to scripts/wife.lua for whatever scoring types are available fallbackscoreType = 1, TipType = 1, -- 1 = Hide,2=tips 3= random quotes phrases, - SongBGEnabled = true, - SongBGMouseEnabled = false, -- removing soon - Particles = false, -- removing soon RateSort = true, HelpMenu = false, ScoreBoardNag = false, diff --git a/Themes/Til Death/Scripts/02 ThemePrefs.lua b/Themes/Til Death/Scripts/02 ThemePrefs.lua index 9ee750aced..6b64fd2ce7 100644 --- a/Themes/Til Death/Scripts/02 ThemePrefs.lua +++ b/Themes/Til Death/Scripts/02 ThemePrefs.lua @@ -744,70 +744,6 @@ function TipType() return t end -function SongBGEnabled() - local t = { - Name = "SongBGEnabled", - LayoutType = "ShowAllInRow", - SelectType = "SelectOne", - OneChoiceForAllPlayers = true, - ExportOnChange = true, - Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")}, - LoadSelections = function(self, list, pn) - local pref = themeConfig:get_data().global.SongBGEnabled - 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.SongBGEnabled = value - themeConfig:set_dirty() - themeConfig:save() - end - } - setmetatable(t, t) - return t -end - -function SongBGMouseEnabled() - local t = { - Name = "SongBGMouseEnabled", - LayoutType = "ShowAllInRow", - SelectType = "SelectOne", - OneChoiceForAllPlayers = true, - ExportOnChange = true, - Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")}, - LoadSelections = function(self, list, pn) - local pref = themeConfig:get_data().global.SongBGMouseEnabled - 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.SongBGMouseEnabled = value - themeConfig:set_dirty() - themeConfig:save() - end - } - setmetatable(t, t) - return t -end - function EvalBGType() local t = { Name = "EvalBGType", diff --git a/Themes/Til Death/metrics.ini b/Themes/Til Death/metrics.ini index 9f0c3df02e..49ef9e6ef4 100644 --- a/Themes/Til Death/metrics.ini +++ b/Themes/Til Death/metrics.ini @@ -497,9 +497,8 @@ LineNames="SongBGEnabled,RateSort,HelpMenu,NPSWindow,MeasureLines,Visualizer,Ins #LineDefaultScore="lua,DefaultScoreType()" LineTipType="lua,TipType()" LineFNFnGSM="lua,FadeNoteFieldInSyncMachine()" -LineSongBGEnabled="lua,SongBGEnabled()" +LineSongBGEnabled="conf,ShowBackgrounds" LineEvalBGType="lua,EvalBGType()" -LineSongBGMouseEnabled="lua,SongBGMouseEnabled()" LineParticles="lua,Particles()" LineRateSort="lua,RateSort()" LineHelpMenu="lua,HelpMenu()" diff --git a/Themes/_fallback/Languages/de.ini b/Themes/_fallback/Languages/de.ini index ce96b2a256..74228315d8 100644 --- a/Themes/_fallback/Languages/de.ini +++ b/Themes/_fallback/Languages/de.ini @@ -465,6 +465,7 @@ Select Group=Toggle Songs in this Group. Select Profile=Choose a profile Server=Start Local Server Servers=Servers +ShowBackgrounds=Schaltet den Liedhintergrund Ein/Aus. Kann mittleres Ruckeln verursachen. ShowBanners=Toggles the display of Banners. ShowCaution=Toggle whether the Caution screen is shown. ShowDanger=Turn this option &oq;OFF&cq; to disable the flashing &oq;Danger&cq; background that shows when you're about to drop to 0% health. @@ -903,6 +904,7 @@ XMode=XMode Off=Aus [OptionTitles] +ShowBackgrounds=Lied-Hintergründe Edit Courses/Mods=Edit Courses/Mods Accel=Beschleunigung Add/Edit Background Change=Add/Edit Background Change diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 15dec2d5ac..c69a5ecd21 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -535,6 +535,7 @@ Select Group=Toggle Songs in this Group. Select Profile=Choose a profile Server=Start Local Server Servers=Servers +ShowBackgrounds = Toggle whether to show the song's background image or not on the select and the eval screen. Turn this off if you experience stutter or lag while scrolling through songs. ShowBanners=Toggles the display of Banners. ShowCaution=Toggle whether the Caution screen is shown. ShowDanger=Turn this option &oq;OFF&cq; to disable the flashing &oq;Danger&cq; background that shows when you're about to drop to 0% health. @@ -1295,6 +1296,7 @@ Shift all timing changes down=Shift all timing changes down Shift all timing changes up=Shift all timing changes up Shift timing in region down=Shift timing in region down Shift timing in region up=Shift timing in region up +ShowBackgrounds = Show Backgrounds ShowBanners=Show Banners ShowCaution=Caution ShowDanger=Danger diff --git a/Themes/_fallback/Languages/zh.ini b/Themes/_fallback/Languages/zh.ini index dd41c17ebc..29ce2bbb81 100644 --- a/Themes/_fallback/Languages/zh.ini +++ b/Themes/_fallback/Languages/zh.ini @@ -507,6 +507,7 @@ Select Group=選擇歌曲放到曲包. Select Profile=選擇一個個人資料. Server=啟動本地服務器. Servers=選擇服務器. +ShowBackgrounds = 選擇是否在選歌界面和結算界面顯示歌曲背景圖片. 如果在選擇歌曲時有明顯卡頓, 建議關閉背景顯示. ShowBanners=選擇是否顯示歌曲標題圖片. ShowCaution=選擇是否顯示警告畫面. ShowDanger=選擇是否在血量少時顯示瀕死警告. @@ -1226,6 +1227,7 @@ Shift all timing changes down=向下轉移全部的校時變更 Shift all timing changes up=向上轉移全部的校時變更 Shift timing in region down=向下轉移區域內的校時變更 Shift timing in region up=向上轉移區域內的校時變更 +ShowBackgrounds = 歌曲背景圖片 ShowBanners=顯示歌曲 標題圖片 ShowCaution=注意事項 ShowDanger=瀕死警告 diff --git a/src/Etterna/Actor/Gameplay/Background.cpp b/src/Etterna/Actor/Gameplay/Background.cpp index d541706b6b..ce39f96afb 100644 --- a/src/Etterna/Actor/Gameplay/Background.cpp +++ b/src/Etterna/Actor/Gameplay/Background.cpp @@ -540,7 +540,8 @@ BackgroundImpl::LoadFromSong(const Song* pSong) // do not load any background if it will never change and is 0 brightness // this allows something like lua to load or modify in the background layer - if (PREFSMAN->m_fBGBrightness == 0.f && !m_pSong->HasBGChanges()) + if ((PREFSMAN->m_fBGBrightness == 0.f || !PREFSMAN->m_bShowBackgrounds) && + !m_pSong->HasBGChanges()) return; // Choose a bunch of backgrounds that we'll use for the random file marker diff --git a/src/Etterna/Screen/Options/ScreenOptionsMasterPrefs.cpp b/src/Etterna/Screen/Options/ScreenOptionsMasterPrefs.cpp index 8551b4d996..eb1b827a70 100644 --- a/src/Etterna/Screen/Options/ScreenOptionsMasterPrefs.cpp +++ b/src/Etterna/Screen/Options/ScreenOptionsMasterPrefs.cpp @@ -802,6 +802,7 @@ InitializeConfOptions() "FitInside", "FitInsideAvoidLetter", "FitInsideAvoidPillar")); + ADD(ConfOption("ShowBackgrounds", MovePref, "Off", "On")); ADD(ConfOption("ShowDanger", MovePref, "Hide", "Show")); ADD(ConfOption( diff --git a/src/Etterna/Singletons/PrefsManager.cpp b/src/Etterna/Singletons/PrefsManager.cpp index 2c099fb3a9..54e50d1def 100644 --- a/src/Etterna/Singletons/PrefsManager.cpp +++ b/src/Etterna/Singletons/PrefsManager.cpp @@ -185,6 +185,7 @@ PrefsManager::PrefsManager() , m_iSoundWriteAhead("SoundWriteAhead", 0) , m_bStretchBackgrounds("StretchBackgrounds", false) , m_fBGBrightness("BGBrightness", 0.2f) + , m_bShowBackgrounds("ShowBackgrounds", true) , m_iTextureColorDepth("TextureColorDepth", 32) , m_bThreadedInput("ThreadedInput", true) , m_bThreadedMovieDecode("ThreadedMovieDecode", true) diff --git a/src/Etterna/Singletons/PrefsManager.h b/src/Etterna/Singletons/PrefsManager.h index 3c3421daf1..bc4bda96a9 100644 --- a/src/Etterna/Singletons/PrefsManager.h +++ b/src/Etterna/Singletons/PrefsManager.h @@ -152,6 +152,7 @@ class PrefsManager Preference m_fLifeDifficultyScale; Preference m_fBGBrightness; + Preference m_bShowBackgrounds; Preference m_bDelayedBack; Preference m_AllowStartToGiveUp;