From 5bd21965d3ad17727b57396289ae26fd0defbbd5 Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Wed, 2 Mar 2011 23:58:52 -0800 Subject: [PATCH] Fouter~'e` --- Docs/Changelog_sm-ssc.txt | 1 + .../Scripts/03 ThemeAndGamePrefs.lua | 37 +++++++++++++++++++ .../ScreenGameplay decorations/default.lua | 3 ++ Themes/default/Languages/en.ini | 3 ++ Themes/default/metrics.ini | 9 ++++- 5 files changed, 52 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 528db84a6a..a44354a134 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -17,6 +17,7 @@ sm-ssc v1.2.3 | 201103?? -------- * [ScreenGameplaySyncMachine] Allow themers to use either .ssc or .sm files. [AJ] * [ScreenHowToPlay] Allow themers to use either .ssc or .sm files. [AJ] +* [ScreenGameplay] Footer to prevent 'arrow overflow' [Midiman] 20110301 -------- diff --git a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua index 1ad0a48266..8d3dd70aec 100644 --- a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua +++ b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua @@ -46,6 +46,7 @@ function InitUserPrefs() { "UserPrefProtimingP1", false}, { "UserPrefProtimingP2", false}, { "FlashyCombos", false}, + { "GameplayFooter", false}, }; for idx,pref in ipairs(Prefs) do @@ -323,6 +324,42 @@ function UserPrefFlashyCombo() setmetatable( t, t ); return t; end + +function UserPrefGameplayFooter() + local t = { + Name = "UserPrefGameplayFooter"; + LayoutType = "ShowAllInRow"; + SelectType = "SelectOne"; + OneChoiceForAllPlayers = true; + ExportOnChange = false; + Choices = { 'Off','On' }; + LoadSelections = function(self, list, pn) + if ReadPrefFromFile("GameplayFooter") ~= nil then + if GetUserPrefB("GameplayFooter") then + list[2] = true; + else + list[1] = true; + end; + else + WritePrefToFile("GameplayFooter",false); + list[1] = true; + end; + end; + SaveSelections = function(self, list, pn) + local val; + if list[2] then + val = true; + else + val = false; + end; + WritePrefToFile("GameplayFooter",val); + MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } ); + THEME:ReloadMetrics(); + end; + }; + setmetatable( t, t ); + return t; +end --[[ end themeoption rows ]] --[[ game option rows ]] diff --git a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index 896a1e535c..63346394a4 100644 --- a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -130,9 +130,12 @@ for pn in ivalues(PlayerNumber) do end; }; end; + +t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame"); t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay"); t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay"); t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle"); + t[#t+1] = Def.ActorFrame { InitCommand=function(self) self:name("SongMeterDisplay"); diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index 6b950974ab..af1e60a2a5 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -70,6 +70,7 @@ UserPrefGameplayShowStepsDisplay=Show Steps UserPrefShowLotsaOptions=Options Density UserPrefLongFail=Fail Length UserPrefFlashyCombo=Flashy Combo +UserPrefGameplayFooter=Gameplay Footer [OptionExplanations] GamePrefAutoSetStyle=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\n( or alternatively hit F2! ) GamePrefNotePosition=Determines where the arrow receptors are placed in gameplay. @@ -82,6 +83,8 @@ UserPrefGameplayShowStepsDisplay=Show or Hide the step information display in ga UserPrefShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. UserPrefLongFail=Choose between the original sm-ssc fail (Long) or the new sm-ssc fail (Short). 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 ). + ScoringType=Defines which scoring method to use. If Special is selected, you can select a Special Scoring Mode in Theme Options. Speed=Adjust the speed at which arrows travel toward the targets. diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index cca7ef73d1..ee1cb21c86 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -824,7 +824,7 @@ ItemsLongRowSharedX=SCREEN_CENTER_X [ScreenOptionsTheme] Fallback="ScreenOptionsServiceChild" -LineNames="gNotePos,gAuto,gScore,gSScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo" +LineNames="gNotePos,gAuto,gScore,gSScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter" LinegNotePos="lua,GamePrefNotePosition()" LinegScore="lua,UserPrefGameplayShowScore()" LinegSScore="lua,UserPrefSpecialScoringMode()" @@ -834,6 +834,7 @@ LinegAuto="lua,GamePrefAutoSetStyle()" LinegLongFail="lua,UserPrefLongFail()" LinegComboUnderField="lua,GamePrefComboUnderField()" LineFlashyCombo="lua,UserPrefFlashyCombo()" +LineGameplayFooter="lua,UserPrefGameplayFooter()" [ScreenOptionsSystemDirection] LineNames="1,2,3,4,5,6,7,8,9,FlashyCombo,RollCombo,10,11,12,13,14,15,16,LF,17,18,19,20,21,22" LineLF="lua,UserPrefLongFail()" @@ -1435,6 +1436,12 @@ StageDisplayY=SCREEN_TOP+24 StageDisplayOnCommand=zoom,0.5; StageDisplayOffCommand=bounceend,0.25;zoom,0 # +ShowScoreFrame=GetUserPrefB("GameplayFooter"); +ScoreFrameX=SCREEN_CENTER_X +ScoreFrameY=SCREEN_BOTTOM +ScoreFrameOnCommand=vertalign,bottom;zoomtowidth,SCREEN_WIDTH+4;diffuse,color("#ffd400");addy,80;sleep,2;decelerate,0.5;addy,-80; +ScoreFrameOffCommand= +# LifeP1X=Center1Player() and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") # LifeP1X=(GAMESTATE:GetCurrentStyle():GetStyleType() == 'StyleType_OnePlayerTwoSides' or (PREFSMAN:GetPreference("Center1Player") and GAMESTATE:GetNumPlayersEnabled() == 1)) and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") LifeP1Y=SCREEN_TOP+24