diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 9790afd40d..765a6d50cc 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,10 @@ ________________________________________________________________________________ StepMania 5.0 $next | 2011???? -------------------------------------------------------------------------------- +2011/09/26 +---------- +* [Default theme] Added Song Timing Display user preference. [AJ] + 2011/09/25 ---------- * [WheelItemBase] Added GetColor and GetText Lua bindings. [AJ] diff --git a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index ed2285c4a4..3aab9df205 100644 --- a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -141,9 +141,10 @@ local function CreateSegments(Player) end local t = LoadFallbackB() t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame"); + for pn in ivalues(PlayerNumber) do - local MetricsName = "SongMeterDisplay" .. PlayerNumberToString(pn); - t[#t+1] = Def.ActorFrame { + local MetricsName = "SongMeterDisplay" .. PlayerNumberToString(pn); + local songMeterDisplay = Def.ActorFrame{ InitCommand=function(self) self:player(pn); self:name(MetricsName); @@ -174,10 +175,11 @@ for pn in ivalues(PlayerNumber) do }; Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. { InitCommand=cmd(visible,false); }; }; - CreateSegments(pn) .. { --- InitCommand=cmd(draworder,10); - }; }; + if ReadPrefFromFile("UserPrefTimingDisplay") == true then + songMeterDisplay[#songMeterDisplay+1] = CreateSegments(pn); + end + t[#t+1] = songMeterDisplay end; for pn in ivalues(PlayerNumber) do local MetricsName = "ToastyDisplay" .. PlayerNumberToString(pn); diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index ab90dbacd0..550d7d5a85 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -100,6 +100,7 @@ UserPrefLongFail=Fail Length UserPrefFlashyCombo=Flashy Combo UserPrefGameplayFooter=Gameplay Footer UserPrefFancyUIBG=Fancy UI Background +UserPrefTimingDisplay=Timing Display [OptionExplanations] UserPrefAutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania (or press Shift+F2). @@ -114,6 +115,7 @@ UserPrefLongFail=Choose between the original "Long" sm-ssc fail or the "Short" f UserPrefFlashyCombo=Determine if combo flashes should be shown or not. UserPrefGameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). UserPrefFancyUIBG=Toggles the fancy background. "Off" is recommended for older computers. Changes will take effect at the title screen. +UserPrefTimingDisplay=Toggles the display of timing segments on the song progress meter. ScoringType=Defines which scoring method to use. If Special is selected, you can select a Special Scoring Mode in Theme Options. diff --git a/Themes/default/Scripts/03 ThemePrefs.lua b/Themes/default/Scripts/03 ThemePrefs.lua index 64ba08fa7b..c2831a6b20 100644 --- a/Themes/default/Scripts/03 ThemePrefs.lua +++ b/Themes/default/Scripts/03 ThemePrefs.lua @@ -28,7 +28,8 @@ function InitUserPrefs() UserPrefProtimingP2 = false, FlashyCombos = false, UserPrefComboUnderField = true, - UserPrefFancyUIBG = true + UserPrefFancyUIBG = true, + UserPrefTimingDisplay = true } for k, v in pairs(Prefs) do -- kind of xxx @@ -63,7 +64,7 @@ function OptionRowScreenFilter() SelectType = "SelectOne", OneChoiceForAllPlayers = false, ExportOnChange = false, - Choices = { 'Off', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', }, + Choices = { THEME:GetString('OptionNames','Off'), '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', }, LoadSelections = function(self, list, pn) local pName = ToEnumShortString(pn) local filterValue = getenv("ScreenFilter"..pName) @@ -101,7 +102,10 @@ function OptionRowProTiming() SelectType = "SelectOne", OneChoiceForAllPlayers = false, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(pn)) then local bShow = GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(pn)) @@ -130,7 +134,10 @@ function UserPrefGameplayShowScore() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefGameplayShowScore") ~= nil then if GetUserPrefB("UserPrefGameplayShowScore") then @@ -161,7 +168,10 @@ function UserPrefGameplayShowStepsDisplay() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefGameplayShowStepsDisplay") ~= nil then if GetUserPrefB("UserPrefGameplayShowStepsDisplay") then @@ -253,7 +263,10 @@ function UserPrefAutoSetStyle() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefAutoSetStyle") ~= nil then if GetUserPrefB("UserPrefAutoSetStyle") then @@ -346,7 +359,10 @@ function UserPrefComboOnRolls() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefComboOnRolls") ~= nil then if GetUserPrefB("UserPrefComboOnRolls") then @@ -377,7 +393,10 @@ function UserPrefFlashyCombo() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefFlashyCombo") ~= nil then if GetUserPrefB("UserPrefFlashyCombo") then @@ -408,7 +427,10 @@ function UserPrefComboUnderField() SelectType = "SelectOne", OneChoiceForAllPlayers = true, ExportOnChange = false, - Choices = { 'Off','On' }, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, LoadSelections = function(self, list, pn) if ReadPrefFromFile("UserPrefComboUnderField") ~= nil then if GetUserPrefB("UserPrefComboUnderField") then @@ -466,4 +488,38 @@ function UserPrefFancyUIBG() return t end +function UserPrefTimingDisplay() + local t = { + Name = "UserPrefTimingDisplay", + LayoutType = "ShowAllInRow", + SelectType = "SelectOne", + OneChoiceForAllPlayers = true, + ExportOnChange = false, + Choices = { + THEME:GetString('OptionNames','Off'), + THEME:GetString('OptionNames','On') + }, + LoadSelections = function(self, list, pn) + if ReadPrefFromFile("UserPrefTimingDisplay") ~= nil then + if GetUserPrefB("UserPrefTimingDisplay") then + list[2] = true + else + list[1] = true + end + else + WritePrefToFile("UserPrefTimingDisplay", true) + list[2] = true + end + end, + SaveSelections = function(self, list, pn) + local val = list[2] and true or false + WritePrefToFile("UserPrefTimingDisplay", val) + MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" }) + THEME:ReloadMetrics() + end + } + setmetatable(t, t) + return t +end + --[[ end option rows ]] diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 415c7bad86..af51f03316 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -1255,10 +1255,11 @@ LineRollCombo="lua,UserPrefComboOnRolls()" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsExtended" PrevScreen="ScreenOptionsExtended" -LineNames="gNotePos,gAuto,gScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter,FancyUIBG" +LineNames="gNotePos,gAuto,gScore,gSDisp,TimingDisplay,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter,FancyUIBG" LinegNotePos="lua,UserPrefNotePosition()" LinegScore="lua,UserPrefGameplayShowScore()" LinegSDisp="lua,UserPrefGameplayShowStepsDisplay()" +LineTimingDisplay="lua,UserPrefTimingDisplay()" LinegOpts="lua,UserPrefShowLotsaOptions()" LinegAuto="lua,UserPrefAutoSetStyle()" LinegLongFail="lua,UserPrefLongFail()"