Allow for displaying the chart artist separately.

This defaults to false/off right now. It needs testing.
This commit is contained in:
Jason Felds
2011-02-28 01:04:24 -05:00
parent 97d0dde50b
commit 5375887c14
4 changed files with 43 additions and 4 deletions
+17
View File
@@ -55,6 +55,7 @@ void StepsDisplay::Load( const RString &sMetricsGroup, const PlayerState *pPlaye
m_bShowTicks.Load(m_sMetricsGroup,"ShowTicks");
m_bShowMeter.Load(m_sMetricsGroup,"ShowMeter");
m_bShowDescription.Load(m_sMetricsGroup,"ShowDescription");
m_bShowCredit.Load(m_sMetricsGroup,"ShowCredit");
m_bShowAutogen.Load(m_sMetricsGroup,"ShowAutogen");
m_bShowStepsType.Load(m_sMetricsGroup,"ShowStepsType");
m_sZeroMeterString.Load(m_sMetricsGroup,"ZeroMeterString");
@@ -91,6 +92,13 @@ void StepsDisplay::Load( const RString &sMetricsGroup, const PlayerState *pPlaye
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textDescription, m_sMetricsGroup );
this->AddChild( &m_textDescription );
}
if( m_bShowCredit )
{
m_textAuthor.SetName( "Step Author" );
m_textAuthor.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"Credit") );
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textAuthor, m_sMetricsGroup );
this->AddChild( &m_textAuthor );
}
if( m_bShowAutogen )
{
@@ -196,6 +204,10 @@ void StepsDisplay::SetInternal( const SetParams &params )
else
sDisplayDescription = CustomDifficultyToLocalizedString( sCustomDifficulty );
msg.SetParam( "DisplayDescription", sDisplayDescription );
RString sDisplayCredit;
if( params.pSteps )
sDisplayCredit = params.pSteps->GetCredit();
if( params.pSteps )
msg.SetParam( "Steps", LuaReference::CreateFromPush(*(Steps*)params.pSteps) );
@@ -241,6 +253,11 @@ void StepsDisplay::SetInternal( const SetParams &params )
m_textDescription.SetText( sDisplayDescription );
m_textDescription.HandleMessage( msg );
}
if( m_bShowCredit )
{
m_textAuthor.SetText( sDisplayCredit );
m_textAuthor.HandleMessage( msg );
}
if( m_bShowAutogen )
{
+12 -4
View File
@@ -1,5 +1,3 @@
/* StepsDisplay - A graphical representation of a Steps or a Trail - has a difficulty number, meter, text, edit description. */
#ifndef StepsDisplay_H
#define StepsDisplay_H
@@ -16,7 +14,10 @@
class Steps;
class Trail;
class PlayerState;
/**
* @brief A graphical representation of a Steps or a Trail.
*
* It has a difficulty number, meter, text, and an edit description. */
class StepsDisplay : public ActorFrame
{
public:
@@ -52,7 +53,13 @@ private:
AutoActor m_sprFrame;
BitmapText m_textTicks; // 111100000
BitmapText m_textMeter; // 3, 9
BitmapText m_textDescription; // Easy, Medium, SuperCoolEdit
/**
* @brief The description of the chart.
*
* This is meant to be separate from the author of the chart. */
BitmapText m_textDescription;
/** @brief The author of the chart. */
BitmapText m_textAuthor;
AutoActor m_sprAutogen; // visible if Steps and is autogen'd
AutoActor m_sprStepsType;
@@ -61,6 +68,7 @@ private:
ThemeMetric<bool> m_bShowTicks;
ThemeMetric<bool> m_bShowMeter;
ThemeMetric<bool> m_bShowDescription;
ThemeMetric<bool> m_bShowCredit;
ThemeMetric<bool> m_bShowAutogen;
ThemeMetric<bool> m_bShowStepsType;
ThemeMetric<RString> m_sZeroMeterString;