"XToThemedString" uses theme metrics. We don't want DateTime

(used by XmlFile) to depend on THEME, so use localized strings.

We may *always* want LocalizedString.  One reason we may not
is if we start using the DynamicThemeMetric paradigm more.
That evaluates expressions when they're used, which allows
metrics to change dynamically.  However, we may really not
want to do that for localized strings, since it would complicate
translation, so we may want to restrict localized strings to
pre-evaluation anyway.
This commit is contained in:
Glenn Maynard
2005-12-30 07:24:30 +00:00
parent b9f3b4a790
commit 6e6fcb746a
3 changed files with 17 additions and 12 deletions
+4 -10
View File
@@ -2,10 +2,8 @@
#include "DateTime.h"
#include "RageUtil.h"
#include "EnumHelper.h"
#if !defined(SMPACKAGE)
#include "ThemeMetric.h"
#endif
#include "LuaFunctions.h"
#include "LocalizedString.h"
DateTime::DateTime()
{
@@ -196,10 +194,8 @@ static const CString MonthNames[] =
"November",
"December",
};
XToString( Month, MONTHS_IN_YEAR );
#if !defined(SMPACKAGE)
XToThemedString( Month, MONTHS_IN_YEAR );
#endif
XToString( Month, NUM_Month );
XToLocalizedString( Month );
CString LastWeekToString( int iLastWeekIndex )
{
@@ -308,9 +304,7 @@ tm GetDayInYearAndYear( int iDayInYearIndex, int iYear )
}
LuaFunction( MonthToString, MonthToString( (Month)IArg(1) ) );
#if !defined(SMPACKAGE)
LuaFunction( MonthToThemedString, MonthToThemedString( (Month)IArg(1) ) );
#endif
LuaFunction( MonthToLocalizedString, MonthToLocalizedString( (Month)IArg(1) ) );
LuaFunction( MonthOfYear, GetLocalTime().tm_mon );
LuaFunction( DayOfMonth, GetLocalTime().tm_mday );
LuaFunction( Hour, GetLocalTime().tm_hour );