Add a lua function to open the optionslist in ScreenSelectMusic

without the select button, OpenOptionsList(pn)
This commit is contained in:
Marcio Barrientos
2011-04-28 18:40:02 -06:00
parent a04f956646
commit c048e7598c
2 changed files with 14 additions and 1 deletions
+11
View File
@@ -1858,6 +1858,14 @@ void ScreenSelectMusic::AfterMusicChange()
AfterStepsOrTrailChange( vpns );
}
void ScreenSelectMusic::OpenOptionsList(PlayerNumber pn)
{
if( pn != PLAYER_INVALID )
{
m_OptionsList[pn].Open();
}
}
// lua start
#include "LuaBinding.h"
@@ -1865,6 +1873,8 @@ void ScreenSelectMusic::AfterMusicChange()
class LunaScreenSelectMusic: public Luna<ScreenSelectMusic>
{
public:
static int OpenOptionsList( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1); p->OpenOptionsList(pn); return 0; }
static int GetGoToOptions( T* p, lua_State *L ) { lua_pushboolean( L, p->GetGoToOptions() ); return 1; }
static int GetMusicWheel( T* p, lua_State *L ) {
p->GetMusicWheel()->PushSelf(L);
@@ -1875,6 +1885,7 @@ public:
{
ADD_METHOD( GetGoToOptions );
ADD_METHOD( GetMusicWheel );
ADD_METHOD( OpenOptionsList );
}
};