fix bookkeeping bugs
This commit is contained in:
@@ -115,13 +115,13 @@ int StringToDayInYear( CString sDayInYear )
|
|||||||
|
|
||||||
static const CString LAST_DAYS_NAME[NUM_LAST_DAYS] =
|
static const CString LAST_DAYS_NAME[NUM_LAST_DAYS] =
|
||||||
{
|
{
|
||||||
|
"Today",
|
||||||
"Yesterday",
|
"Yesterday",
|
||||||
"Day2Ago",
|
"Day2Ago",
|
||||||
"Day3Ago",
|
"Day3Ago",
|
||||||
"Day4Ago",
|
"Day4Ago",
|
||||||
"Day5Ago",
|
"Day5Ago",
|
||||||
"Day6Ago",
|
"Day6Ago",
|
||||||
"Day7Ago",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CString LastDayToString( int iLastDayIndex )
|
CString LastDayToString( int iLastDayIndex )
|
||||||
@@ -147,7 +147,7 @@ CString DayOfWeekToString( int iDayOfWeekIndex )
|
|||||||
|
|
||||||
CString HourInDayToString( int iHourInDayIndex )
|
CString HourInDayToString( int iHourInDayIndex )
|
||||||
{
|
{
|
||||||
return ssprintf("Hour%02d_00", iHourInDayIndex);
|
return ssprintf("Hour%02d", iHourInDayIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CString MONTH_TO_NAME[MONTHS_IN_YEAR] =
|
static const CString MONTH_TO_NAME[MONTHS_IN_YEAR] =
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ void ScreenBookkeeping::ChangeView( View newView )
|
|||||||
sData += "\n";
|
sData += "\n";
|
||||||
|
|
||||||
sTitle += "Average\n";
|
sTitle += "Average\n";
|
||||||
sData += ssprintf("%d\n",iTotalLast/NUM_LAST_DAYS);
|
float fAverage = iTotalLast/(float)NUM_LAST_DAYS;
|
||||||
|
sData += ssprintf("%.1f\n",fAverage);
|
||||||
|
|
||||||
m_textCols[0].SetHorizAlign( Actor::align_left );
|
m_textCols[0].SetHorizAlign( Actor::align_left );
|
||||||
m_textCols[0].SetText( sTitle );
|
m_textCols[0].SetText( sTitle );
|
||||||
@@ -153,7 +154,7 @@ void ScreenBookkeeping::ChangeView( View newView )
|
|||||||
for( int row=0; row<52/4; row++ )
|
for( int row=0; row<52/4; row++ )
|
||||||
{
|
{
|
||||||
int week = row*4+col;
|
int week = row*4+col;
|
||||||
sTemp += ssprintf("%d ago: %d\n", week+1, coins[week]);
|
sTemp += LastWeekToString(week) + ssprintf(": %d",coins[week]) + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
m_textCols[col].SetHorizAlign( Actor::align_left );
|
m_textCols[col].SetHorizAlign( Actor::align_left );
|
||||||
|
|||||||
Reference in New Issue
Block a user