Fixed ScreenPrompt::AnswerOnCommand metrics by calling LOAD_ALL_COMMANDS after the name was set.
This commit is contained in:
@@ -4,6 +4,10 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
|
||||
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
||||
________________________________________________________________________________
|
||||
|
||||
2014/11/05
|
||||
----------
|
||||
* [ScreenPrompt] Answer OnCommand metrics fixed to actually work.
|
||||
|
||||
2014/11/01
|
||||
----------
|
||||
* [RollingNumbers] Cropping and color during tweens fixed.
|
||||
|
||||
+1
-1
@@ -885,7 +885,7 @@ void BitmapText::Attribute::FromStack( lua_State *L, int iPos )
|
||||
lua_getfield( L, iTab, "Diffuses" );
|
||||
if( !lua_isnil(L, -1) )
|
||||
{
|
||||
for( int i = 1; i <= 4; ++i )
|
||||
for( int i = 1; i <= NUM_DIFFUSE_COLORS; ++i )
|
||||
{
|
||||
lua_rawgeti( L, -i, i );
|
||||
diffuse[i-1].FromStack( L, -1 );
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ public:
|
||||
{
|
||||
Attribute() : length(-1), glow() { }
|
||||
int length;
|
||||
RageColor diffuse[4];
|
||||
RageColor diffuse[NUM_DIFFUSE_COLORS];
|
||||
RageColor glow;
|
||||
|
||||
void FromStack( lua_State *L, int iPos );
|
||||
|
||||
@@ -66,7 +66,12 @@ void ScreenPrompt::Init()
|
||||
for( int i=0; i<NUM_PromptAnswer; i++ )
|
||||
{
|
||||
m_textAnswer[i].LoadFromFont( THEME->GetPathF(m_sName,"answer") );
|
||||
LOAD_ALL_COMMANDS( m_textAnswer[i] );
|
||||
// The name of the actor isn't set because it is not known at this point
|
||||
// how many answers there will be, and the name depends on the number of
|
||||
// answers as a clumsy way of letting the themer set different positions
|
||||
// for different answer groups. The name is set in BeginScreen, and
|
||||
// then the commands are loaded. -Kyz (At least, that seems like the
|
||||
// explanation to me, reading the code years after the author left)
|
||||
this->AddChild( &m_textAnswer[i] );
|
||||
}
|
||||
|
||||
@@ -90,6 +95,9 @@ void ScreenPrompt::BeginScreen()
|
||||
{
|
||||
RString sElem = ssprintf("Answer%dOf%d", i+1, g_PromptType+1);
|
||||
m_textAnswer[i].SetName( sElem );
|
||||
LOAD_ALL_COMMANDS(m_textAnswer[i]);
|
||||
// Side note: Because LOAD_ALL_COMMANDS occurs here, InitCommand will
|
||||
// not be run for the actors. People can just use OnCommand instead.
|
||||
RString sAnswer = PromptAnswerToString( (PromptAnswer)i );
|
||||
// FRAGILE
|
||||
if( g_PromptType == PROMPT_OK )
|
||||
|
||||
Reference in New Issue
Block a user