added SelectType and LayoutType enums

This commit is contained in:
AJ Kelly
2011-02-19 23:40:26 -06:00
parent 58436d2579
commit 16b67c706b
+9 -10
View File
@@ -19,6 +19,7 @@ enum SelectType
}; };
const RString& SelectTypeToString( SelectType pm ); const RString& SelectTypeToString( SelectType pm );
SelectType StringToSelectType( const RString& s ); SelectType StringToSelectType( const RString& s );
LuaDeclareType( SelectType );
enum LayoutType enum LayoutType
{ {
@@ -29,6 +30,7 @@ enum LayoutType
}; };
const RString& LayoutTypeToString( LayoutType pm ); const RString& LayoutTypeToString( LayoutType pm );
LayoutType StringToLayoutType( const RString& s ); LayoutType StringToLayoutType( const RString& s );
LuaDeclareType( LayoutType );
struct OptionRowDefinition struct OptionRowDefinition
{ {
@@ -44,7 +46,7 @@ struct OptionRowDefinition
bool m_bAllowThemeItems; // Should be true for dynamic strings. bool m_bAllowThemeItems; // Should be true for dynamic strings.
bool m_bAllowThemeTitle; // Should be true for dynamic strings. bool m_bAllowThemeTitle; // Should be true for dynamic strings.
bool m_bAllowExplanation; // if false, ignores ScreenOptions::SHOW_EXPLANATIONS. Should be true for dynamic strings. bool m_bAllowExplanation; // if false, ignores ScreenOptions::SHOW_EXPLANATIONS. Should be true for dynamic strings.
bool m_bShowChoicesListOnSelect; bool m_bShowChoicesListOnSelect; // (currently unused)
bool IsEnabledForPlayer( PlayerNumber pn ) const bool IsEnabledForPlayer( PlayerNumber pn ) const
{ {
@@ -106,18 +108,15 @@ public:
virtual void LoadInternal( const Commands &cmds ) { } virtual void LoadInternal( const Commands &cmds ) { }
/* /* We may re-use OptionRowHandlers. This is called before each use. If the
* We may re-use OptionRowHandlers. This is called before each * contents of the row are dependent on external state (for example, the
* use. If the contents of the row are dependent on external * current song), clear the row contents and reinitialize them. As an
* state (for example, the current song), clear the row contents * optimization, rows which do not change can be initialized just once and
* and reinitialize them. As an optimization, rows which do not * left alone.
* change can be initialized just once and left alone.
*
* If the row has been reinitialized, return RELOAD_CHANGED_ALL, and the * If the row has been reinitialized, return RELOAD_CHANGED_ALL, and the
* graphic elements will also be reinitialized. If only m_vEnabledForPlayers * graphic elements will also be reinitialized. If only m_vEnabledForPlayers
* has been changed, return RELOAD_CHANGED_ENABLED. If the row is static, and * has been changed, return RELOAD_CHANGED_ENABLED. If the row is static, and
* nothing has changed, return RELOAD_CHANGED_NONE. * nothing has changed, return RELOAD_CHANGED_NONE. */
*/
enum ReloadChanged { RELOAD_CHANGED_NONE, RELOAD_CHANGED_ENABLED, RELOAD_CHANGED_ALL }; enum ReloadChanged { RELOAD_CHANGED_NONE, RELOAD_CHANGED_ENABLED, RELOAD_CHANGED_ALL };
virtual ReloadChanged Reload() { return RELOAD_CHANGED_NONE; } virtual ReloadChanged Reload() { return RELOAD_CHANGED_NONE; }