bind
This commit is contained in:
@@ -1301,6 +1301,26 @@ int ScreenOptions::GetCurrentRow( PlayerNumber pn ) const
|
||||
return r;
|
||||
}
|
||||
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
class LunaScreenOptions: public Luna<ScreenOptions>
|
||||
{
|
||||
public:
|
||||
LunaScreenOptions() { LUA->Register( Register ); }
|
||||
|
||||
static int GetCurrentRow( T* p, lua_State *L ) { lua_pushnumber( L, p->GetCurrentRow((PlayerNumber) IArg(1)) ); return 1; }
|
||||
static void Register( Lua *L )
|
||||
{
|
||||
ADD_METHOD( GetCurrentRow );
|
||||
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_DERIVED_CLASS( ScreenOptions, ScreenWithMenuElements )
|
||||
// lua end
|
||||
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||
|
||||
@@ -89,6 +89,13 @@ protected:
|
||||
bool IsOnLastRow( PlayerNumber pn ) const;
|
||||
bool AllAreOnLastRow() const;
|
||||
|
||||
public:
|
||||
//
|
||||
// Lua
|
||||
//
|
||||
virtual void PushSelf( lua_State *L );
|
||||
friend class LunaScreenOptions;
|
||||
|
||||
protected: // derived classes need access to these
|
||||
void SetOptionIcon( PlayerNumber pn, int iRow, CString sText, GameCommand &gc );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user