updates
This commit is contained in:
@@ -18,19 +18,19 @@ void ScreenBookkeeping::Init()
|
|||||||
|
|
||||||
m_textAllTime.LoadFromFont( THEME->GetPathF(m_sName,"AllTime") );
|
m_textAllTime.LoadFromFont( THEME->GetPathF(m_sName,"AllTime") );
|
||||||
m_textAllTime.SetName( "AllTime" );
|
m_textAllTime.SetName( "AllTime" );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textAllTime );
|
LOAD_ALL_COMMANDS_AND_SET_XY( m_textAllTime );
|
||||||
this->AddChild( &m_textAllTime );
|
this->AddChild( &m_textAllTime );
|
||||||
|
|
||||||
m_textTitle.LoadFromFont( THEME->GetPathF(m_sName,"title") );
|
m_textTitle.LoadFromFont( THEME->GetPathF(m_sName,"title") );
|
||||||
m_textTitle.SetName( "Title" );
|
m_textTitle.SetName( "Title" );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textTitle );
|
LOAD_ALL_COMMANDS_AND_SET_XY( m_textTitle );
|
||||||
this->AddChild( &m_textTitle );
|
this->AddChild( &m_textTitle );
|
||||||
|
|
||||||
for( int i=0; i<NUM_BOOKKEEPING_COLS; i++ )
|
for( int i=0; i<NUM_BOOKKEEPING_COLS; i++ )
|
||||||
{
|
{
|
||||||
m_textData[i].LoadFromFont( THEME->GetPathF(m_sName,"data") );
|
m_textData[i].LoadFromFont( THEME->GetPathF(m_sName,"data") );
|
||||||
m_textData[i].SetName( "Data" );
|
m_textData[i].SetName( "Data" );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textData[i] );
|
LOAD_ALL_COMMANDS_AND_SET_XY( m_textData[i] );
|
||||||
float fX = SCALE( i, 0.f, NUM_BOOKKEEPING_COLS-1, SCREEN_LEFT+50, SCREEN_RIGHT-160 );
|
float fX = SCALE( i, 0.f, NUM_BOOKKEEPING_COLS-1, SCREEN_LEFT+50, SCREEN_RIGHT-160 );
|
||||||
m_textData[i].SetX( fX );
|
m_textData[i].SetX( fX );
|
||||||
this->AddChild( &m_textData[i] );
|
this->AddChild( &m_textData[i] );
|
||||||
@@ -39,11 +39,6 @@ void ScreenBookkeeping::Init()
|
|||||||
ChangeView( (View)0 );
|
ChangeView( (View)0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenBookkeeping::~ScreenBookkeeping()
|
|
||||||
{
|
|
||||||
LOG->Trace( "ScreenBookkeeping::~ScreenBookkeeping()" );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenBookkeeping::Update( float fDelta )
|
void ScreenBookkeeping::Update( float fDelta )
|
||||||
{
|
{
|
||||||
ChangeView( m_View ); // refresh so that counts change in real-time
|
ChangeView( m_View ); // refresh so that counts change in real-time
|
||||||
@@ -61,14 +56,14 @@ void ScreenBookkeeping::Input( const InputEventPlus &input )
|
|||||||
|
|
||||||
void ScreenBookkeeping::MenuLeft( const InputEventPlus &input )
|
void ScreenBookkeeping::MenuLeft( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
m_View = (View)(m_View-1);
|
m_View = enum_add2( m_View, -1 );
|
||||||
ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) );
|
ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) );
|
||||||
ChangeView( m_View );
|
ChangeView( m_View );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenBookkeeping::MenuRight( const InputEventPlus &input )
|
void ScreenBookkeeping::MenuRight( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
m_View = (View)(m_View+1);
|
m_View = enum_add2( m_View, +1 );
|
||||||
ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) );
|
ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) );
|
||||||
ChangeView( m_View );
|
ChangeView( m_View );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class ScreenBookkeeping : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
virtual ~ScreenBookkeeping();
|
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
virtual void Input( const InputEventPlus &input );
|
virtual void Input( const InputEventPlus &input );
|
||||||
@@ -24,6 +23,8 @@ public:
|
|||||||
virtual void MenuCoin( const InputEventPlus &input );
|
virtual void MenuCoin( const InputEventPlus &input );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual bool GenericTweenOn() const { return true; }
|
||||||
|
virtual bool GenericTweenOff() const { return true; }
|
||||||
enum View { VIEW_LAST_DAYS, VIEW_LAST_WEEKS, VIEW_DAY_OF_WEEK, VIEW_HOUR_OF_DAY, NUM_VIEWS };
|
enum View { VIEW_LAST_DAYS, VIEW_LAST_WEEKS, VIEW_DAY_OF_WEEK, VIEW_HOUR_OF_DAY, NUM_VIEWS };
|
||||||
|
|
||||||
void ChangeView( View newView );
|
void ChangeView( View newView );
|
||||||
|
|||||||
Reference in New Issue
Block a user