From 4a6c3dc99aaa51a9a535215aafcb0f3820d3dee6 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 21 Dec 2008 22:16:54 +0000 Subject: [PATCH] mod icon fixup --- .../default.lua | 10 +++-- .../ScreenGameplay decorations/default.lua | 32 ++++++++-------- .../ScreenSelectMusic decorations/default.lua | 35 ++++++++--------- .../Graphics/ScreenEvaluation StageAward.lua | 6 ++- stepmania/Themes/default/Languages/en.ini | 2 +- stepmania/Themes/default/Scripts/ActorDef.lua | 2 +- stepmania/Themes/default/metrics.ini | 38 +++++++++---------- stepmania/src/ActorUtil.cpp | 6 +-- stepmania/src/ModIconRow.cpp | 3 +- stepmania/src/MusicWheelItem.cpp | 2 +- 10 files changed, 73 insertions(+), 63 deletions(-) diff --git a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua index 248f5b0c91..eba151ac99 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage decorations/default.lua @@ -5,7 +5,8 @@ function GraphDisplay( pn ) BeginCommand=function(self) local ss = SCREENMAN:GetTopScreen():GetStageStats(); self:Set( ss, ss:GetPlayerStageStats(pn) ); - end, + self:player( pn ); + end }; }; return t; @@ -18,7 +19,8 @@ function ComboGraph( pn ) BeginCommand=function(self) local ss = SCREENMAN:GetTopScreen():GetStageStats(); self:Set( ss, ss:GetPlayerStageStats(pn) ); - end, + self:player( pn ); + end }; }; return t; @@ -47,7 +49,9 @@ if ShowStandardDecoration("ItsARecord") then BeginCommand=function(self) local pss = SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(pn); local index = pss:GetMachineHighScoreIndex(); - local hsl = PROFILEMAN:GetMachineProfile():GetHighScoreList(pSong,pSteps); + local pSongOrCourse = GAMESTATE:GetCurrentCourse() or GAMESTATE:GetCurrentSong(); + local pSteps = GAMESTATE:GetCurrentSteps(); + local hsl = PROFILEMAN:GetMachineProfile():GetHighScoreList(pSongOrCourse,pSteps); local hsName = hsl:GetHighScores()[1]:GetName(); local hsPerc = hsl:GetHighScores()[1]:GetPercentDP(); diff --git a/stepmania/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/stepmania/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index f16d698d4e..18882d6883 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -3,14 +3,14 @@ local t = LoadFallbackB(); t[#t+1] = StandardDecorationFromFile( "StageFrame", "StageFrame" ); t[#t+1] = LoadActor("_warning") .. { - InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y; - vertalign,top; - wag;effectmagnitude,0,0,10;effectperiod,2; - ); - OnCommand=cmd(diffusealpha,0); - ShowDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,1); - HideDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0); - }; + InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y; + vertalign,top; + wag;effectmagnitude,0,0,10;effectperiod,2; + ); + OnCommand=cmd(diffusealpha,0); + ShowDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,1); + HideDangerAllMessageCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0); +}; t[#t+1] = StandardDecorationFromFile( "LifeFrame", "LifeFrame" ); t[#t+1] = StandardDecorationFromFile( "ScoreFrame", "ScoreFrame" ); @@ -19,15 +19,15 @@ t[#t+1] = StandardDecorationFromFile( "RightFrame", "RightFrame" ); t[#t+1] = Def.ModIconRow { - InitCommand=cmd(x,SCREEN_CENTER_X-300;y,SCREEN_CENTER_Y;Load,"ModIconRowGameplay",PLAYER_1;player,PLAYER_1;); - OnCommand=cmd(zoomy,0;linear,0.5;zoomy,1); - OffCommand=cmd(linear,0.5;zoomy,0); - }; + InitCommand=cmd(x,THEME:GetMetric(Var "LoadingScreen","LeftFrameX");y,THEME:GetMetric(Var "LoadingScreen","LeftFrameY");Load,"ModIconRowGameplayP1",PLAYER_1;player,PLAYER_1;); + OnCommand=cmd(zoomy,0;linear,0.5;zoomy,1); + OffCommand=cmd(linear,0.5;zoomy,0); +}; t[#t+1] = Def.ModIconRow { - InitCommand=cmd(x,SCREEN_CENTER_X+300;y,SCREEN_CENTER_Y;Load,"ModIconRowGameplay",PLAYER_2;player,PLAYER_2;); - OnCommand=cmd(zoomy,0;linear,0.5;zoomy,1); - OffCommand=cmd(linear,0.5;zoomy,0); - }; + InitCommand=cmd(x,THEME:GetMetric(Var "LoadingScreen","RightFrameX");y,THEME:GetMetric(Var "LoadingScreen","RightFrameY");Load,"ModIconRowGameplayP2",PLAYER_2;player,PLAYER_2;); + OnCommand=cmd(zoomy,0;linear,0.5;zoomy,1); + OffCommand=cmd(linear,0.5;zoomy,0); +}; return t; diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua index a48d68158d..0a2111b1e1 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua @@ -22,8 +22,8 @@ local t = LoadFallbackB(); t[#t+1] = Def.ActorFrame { InitCommand=cmd(x,SCREEN_CENTER_X+140;y,SCREEN_CENTER_Y-20); - OnCommand=cmd(addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); LoadActor( "_banner mask" ) .. { InitCommand=cmd(y,-74;zwrite,1;z,1;blend,"BlendMode_NoEffect"); }; @@ -65,10 +65,11 @@ for pn in ivalues(PlayerNumber) do local MetricsName = "OptionsArea" .. PlayerNumberToString(pn); local spacing_x = THEME:GetMetric("ModIconRowSelectMusic","SpacingX"); local spacing_y = THEME:GetMetric("ModIconRowSelectMusic","SpacingY"); + local num = THEME:GetMetric("ModIconRowSelectMusic","NumModIcons"); t[#t+1] = Def.ActorFrame { - InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end; + InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end; Def.ActorFrame { - InitCommand=cmd(x,-1*spacing_x;y,-1*spacing_y;); + InitCommand=cmd(x,(-1-(num-1)/2)*spacing_x;y,(-1-(num-1)/2)*spacing_y;); LoadActor( "option icon header" ) .. { }; LoadFont("_terminator two 18px" ) .. { @@ -95,7 +96,7 @@ t[#t+1] = Def.ActorFrame { SetCommand = function(self) local so = GAMESTATE:GetSortOrder(); if so ~= nil then - self:settext( string.upper(so) ) + self:settext( string.upper( SortOrderToLocalizedString(so)) ) end; end; SortOrderChangedMessageCommand=cmd(playcommand,"Set"); @@ -116,7 +117,7 @@ for pn in ivalues(PlayerNumber) do t[#t+1] = Def.PaneDisplay { MetricsGroup="PaneDisplay"; PlayerNumber=pn; - InitCommand=function(self) self:player(pn); self:playcommand("Set"); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end; + InitCommand=function(self) self:player(pn); self:playcommand("Set"); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end; SetCommand=function(self) self:SetFromGameState() end; CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set"); @@ -128,28 +129,28 @@ t[#t+1] = Def.BPMDisplay { File=THEME:GetPathF("BPMDisplay", "bpm"); Name="BPMDisplay"; InitCommand=cmd(horizalign,right;x,SCREEN_CENTER_X+294;y,SCREEN_CENTER_Y-9;zoomx,0.8;shadowlengthx,0;shadowlengthy,2;shadowcolor,color("#000000");); - OnCommand=cmd(stoptweening;addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(stoptweening;addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); SetCommand=function(self) self:SetFromGameState() end; CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); }; t[#t+1] = LoadActor( "_bpm label" ) .. { InitCommand=cmd(horizalign,left;x,SCREEN_CENTER_X+280;y,SCREEN_CENTER_Y-10); - OnCommand=cmd(addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); }; t[#t+1] = LoadActor( "temp bpm meter" ) .. { InitCommand=cmd(x,SCREEN_CENTER_X+230;y,SCREEN_CENTER_Y-22); - OnCommand=cmd(addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); }; t[#t+1] = Def.ActorFrame { InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); - OnCommand=cmd(addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); BeginCommand=cmd(visible,false); @@ -185,8 +186,8 @@ t[#t+1] = Def.ActorFrame { }; t[#t+1] = LoadActor( "stop icon" ) .. { InitCommand=cmd(x,SCREEN_CENTER_X+296;y,SCREEN_CENTER_Y-4); - OnCommand=cmd(addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6); - OffCommand=cmd(bouncebegin,0.5;addx,-SCREEN_WIDTH*0.6); + OnCommand=cmd(addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6); + OffCommand=cmd(bouncebegin,0.5;addx,SCREEN_WIDTH*0.6); SetCommand=function(self) local b = false; local song = GAMESTATE:GetCurrentSong(); @@ -310,7 +311,7 @@ t[#t+1] = Def.CourseContentsList { for pn in ivalues(PlayerNumber) do local MetricsName = "StepsDisplay" .. PlayerNumberToString(pn); t[#t+1] = StepsDisplay(pn) .. { - InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end; + InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end; }; end diff --git a/stepmania/Themes/default/Graphics/ScreenEvaluation StageAward.lua b/stepmania/Themes/default/Graphics/ScreenEvaluation StageAward.lua index 7c10d9fbcf..cf7d1e90de 100644 --- a/stepmania/Themes/default/Graphics/ScreenEvaluation StageAward.lua +++ b/stepmania/Themes/default/Graphics/ScreenEvaluation StageAward.lua @@ -1,6 +1,10 @@ return LoadFont( "_venacti bold 15" ) .. { InitCommand=cmd(strokecolor,color("#e6ffff");diffusetopedge,color("#007fa8");diffusebottomedge,color("#2fbbdc");shadowlength,0;maxwidth,144;glowshift;); SetCommand=function(self,param) - self:settext( StageAwardToLocalizedString(param.StageAward) ); + if param.StageAward then + self:settext( StageAwardToLocalizedString(param.StageAward) ); + else + self:visible(false); + end end }; \ No newline at end of file diff --git a/stepmania/Themes/default/Languages/en.ini b/stepmania/Themes/default/Languages/en.ini index a89c902448..2b86755bf9 100644 --- a/stepmania/Themes/default/Languages/en.ini +++ b/stepmania/Themes/default/Languages/en.ini @@ -1289,7 +1289,7 @@ HelpTextSelectMusic=Use &MENULEFT;&MENURIGHT; to select, then press &START; HelpTextDifficultyPart=&UP;&UP; easier difficulty &DOWN;&DOWN; harder difficulty HelpTextOptions=&MENUUP;&MENUDOWN; line &MENULEFT;&MENURIGHT; change &START; choose HelpTextOptionsAndBack=&MENUUP;&MENUDOWN; line &MENULEFT;&MENURIGHT; change &START; choose &BACK; discard -HelpTextOptionsSimple=&MENUUP;&MENUDOWN; line &START; choose +HelpTextOptionsSimple=&MENUUP;&MENUDOWN; change &START; choose HelpTextOptionsSimpleAndBack=&MENUUP;&MENUDOWN; line &START; choose &BACK; discard HelpTextSort=&UP;&DOWN;&UP;&DOWN; to change sort HelpTextContinue=Press any button or key. Press ESCAPE when done. diff --git a/stepmania/Themes/default/Scripts/ActorDef.lua b/stepmania/Themes/default/Scripts/ActorDef.lua index 9a2cd71880..c06520602c 100644 --- a/stepmania/Themes/default/Scripts/ActorDef.lua +++ b/stepmania/Themes/default/Scripts/ActorDef.lua @@ -174,7 +174,7 @@ end function StandardDecorationFromTable( MetricsName, t ) if type(t) == "table" then t = t .. { - InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXYAndOnCommand(self,Var "LoadingScreen"); end; + InitCommand=function(self) self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end; }; end return t; diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index db053065b2..d195e03664 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -647,11 +647,11 @@ PaneDisplayP2X=SCREEN_CENTER_X+180 PaneDisplayP2Y=SCREEN_CENTER_Y+194 PaneDisplayP2OnCommand= PaneDisplayP2OffCommand= -OptionsAreaP1X=SCREEN_CENTER_X+56 +OptionsAreaP1X=SCREEN_CENTER_X+166 OptionsAreaP1Y=SCREEN_CENTER_Y+128 OptionsAreaP1OnCommand= OptionsAreaP1OffCommand= -OptionsAreaP2X=SCREEN_CENTER_X+56 +OptionsAreaP2X=SCREEN_CENTER_X+166 OptionsAreaP2Y=SCREEN_CENTER_Y+148 OptionsAreaP2OnCommand= OptionsAreaP2OffCommand= @@ -919,14 +919,6 @@ SecondaryScoreP2X=SCREEN_CENTER_X+20 SecondaryScoreP2Y=SCREEN_CENTER_Y+0 SecondaryScoreP2OnCommand= SecondaryScoreP2OffCommand= -LeftFrameX=SCREEN_CENTER_X-320 -LeftFrameY=SCREEN_CENTER_Y -LeftFrameOnCommand= -LeftFrameOffCommand= -RightFrameX=SCREEN_CENTER_X+320 -RightFrameY=SCREEN_CENTER_Y -RightFrameOnCommand= -RightFrameOffCommand= PlayerOptionsP1X=SCREEN_CENTER_X+0 PlayerOptionsP1Y=SCREEN_CENTER_Y+194 PlayerOptionsP1OnCommand=visible,false @@ -975,14 +967,14 @@ StepsDisplayP1X=SCREEN_CENTER_X-250 StepsDisplayP1Y= StepsDisplayP1OnCommand= StepsDisplayP1OffCommand=linear,0.5;addx,-200 -StepsDisplayP1SetReverseCommand=y,SCREEN_CENTER_Y-196;addx,-200;linear,0.5;addx,200 -StepsDisplayP1SetNoReverseCommand=y,SCREEN_CENTER_Y+174;addx,-200;linear,0.5;addx,200 +StepsDisplayP1SetReverseCommand=y,SCREEN_CENTER_Y-196;addy,-100;linear,1;addy,100 +StepsDisplayP1SetNoReverseCommand=y,SCREEN_CENTER_Y+174;addy,100;linear,1;addy,-100 StepsDisplayP2X=SCREEN_CENTER_X+250 StepsDisplayP2Y= StepsDisplayP2OnCommand= StepsDisplayP2OffCommand=linear,0.5;addx,200 -StepsDisplayP2SetReverseCommand=y,SCREEN_CENTER_Y-196;addx,200;linear,0.5;addx,-200 -StepsDisplayP2SetNoReverseCommand=y,SCREEN_CENTER_Y+174;addx,200;linear,0.5;addx,-200 +StepsDisplayP2SetReverseCommand=y,SCREEN_CENTER_Y-196;addy,-100;linear,1;addy,100 +StepsDisplayP2SetNoReverseCommand=y,SCREEN_CENTER_Y+174;addy,100;linear,1;addy,-100 LyricsSetNoReverseCommand=x,SCREEN_CENTER_X+0;y,SCREEN_CENTER_Y+160 LyricsSetReverseCommand=x,SCREEN_CENTER_X+0;y,SCREEN_CENTER_Y-140 # This is used if one player is in reverse and the other isn't. @@ -1019,6 +1011,14 @@ PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X PlayerP1TwoPlayersSharedSidesX=SCREEN_CENTER_X PlayerP2TwoPlayersSharedSidesX=SCREEN_CENTER_X +LeftFrameX=math.floor(scale(0.25,0,1,SCREEN_LEFT,SCREEN_RIGHT))-160 +LeftFrameY=SCREEN_CENTER_Y +LeftFrameOnCommand= +LeftFrameOffCommand= +RightFrameX=math.floor(scale(0.75,0,1,SCREEN_LEFT,SCREEN_RIGHT))+160 +RightFrameY=SCREEN_CENTER_Y +RightFrameOnCommand= +RightFrameOffCommand= StopCourseEarly=false ShowEvaluationOnFail=true @@ -1846,9 +1846,9 @@ SkipWidth=190 SkipSpacingY=14 [MusicWheelItem] -IconX=-136 -IconY=0 -IconOnCommand= +WheelNotifyIconX=-106 +WheelNotifyIconY=0 +WheelNotifyIconOnCommand= SongNameX=-30 SongNameY=0 SongNameOnCommand= @@ -2099,12 +2099,12 @@ ShowStyleIcon=true ShowStageDisplay=false StageDisplayX=SCREEN_CENTER_X+234 StageDisplayY=SCREEN_CENTER_Y-172 -StageDisplayOnCommand=draworder,-2;addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6 +StageDisplayOnCommand=draworder,-2;addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6 StageDisplayOffCommand=linear,0.5;addx,SCREEN_WIDTH*0.6 ShowStageFrame=false StageFrameX=SCREEN_CENTER_X+234 StageFrameY=SCREEN_CENTER_Y-172 -StageFrameOnCommand=draworder,-2;addx,-SCREEN_WIDTH*0.6;bounceend,0.5;addx,SCREEN_WIDTH*0.6 +StageFrameOnCommand=draworder,-2;addx,SCREEN_WIDTH*0.6;bounceend,0.5;addx,-SCREEN_WIDTH*0.6 StageFrameOffCommand=linear,0.5;addx,SCREEN_WIDTH*0.6 MemoryCardIcons=true CancelTransitionsOut=false diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index be8e514cee..5dde6b6098 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -435,10 +435,10 @@ namespace lua_pushboolean( L, IsRegistered(SArg(1)) ); return 1; } - static int LoadAllCommandsAndSetXYAndOnCommand( lua_State *L ) + static int LoadAllCommandsAndSetXY( lua_State *L ) { Actor *p = Luna::check( L, 1 ); - ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( p, SArg(2) ); + ActorUtil::LoadAllCommandsAndSetXY( p, SArg(2) ); return 0; } @@ -447,7 +447,7 @@ namespace LIST_METHOD( GetFileType ), LIST_METHOD( ResolvePath ), LIST_METHOD( IsRegisteredClass ), - LIST_METHOD( LoadAllCommandsAndSetXYAndOnCommand ), + LIST_METHOD( LoadAllCommandsAndSetXY ), { NULL, NULL } }; } diff --git a/stepmania/src/ModIconRow.cpp b/stepmania/src/ModIconRow.cpp index 14fbe44129..a29d5163b5 100644 --- a/stepmania/src/ModIconRow.cpp +++ b/stepmania/src/ModIconRow.cpp @@ -44,7 +44,8 @@ void ModIconRow::Load( const RString &sMetricsGroup, PlayerNumber pn ) { ModIcon *p = new ModIcon; p->SetName( "ModIcon" ); - p->SetXY( i*SPACING_X, i*SPACING_Y ); + float fOffset = SCALE( i, 0, NUM_OPTION_ICONS-1, -(NUM_OPTION_ICONS-1)/2.0f, (float)(NUM_OPTION_ICONS-1)/2.0f ); + p->SetXY( fOffset*SPACING_X, fOffset*SPACING_Y ); p->Load( OPTION_ICON_METRICS_GROUP ); ActorUtil::LoadAllCommands( p, sMetricsGroup ); m_vpModIcon.push_back( p ); diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index d1e86ddc8b..95f3bb4ea1 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -85,7 +85,7 @@ MusicWheelItem::MusicWheelItem( RString sType ): m_pTextSectionCount->PlayCommand( "On" ); this->AddChild( m_pTextSectionCount ); - m_WheelNotifyIcon.SetName( "Icon" ); + m_WheelNotifyIcon.SetName( "WheelNotifyIcon" ); ActorUtil::LoadAllCommands( m_WheelNotifyIcon, "MusicWheelItem" ); ActorUtil::SetXY( m_WheelNotifyIcon, "MusicWheelItem" ); m_WheelNotifyIcon.PlayCommand( "On" );