thinking of how to expose this to Lua...

This commit is contained in:
AJ Kelly
2011-05-15 03:17:30 -05:00
parent 376ab3d66f
commit 728a317a90
+26 -1
View File
@@ -66,10 +66,35 @@ void ModIconRow::HandleMessage( const Message &msg )
struct OptionColumnEntry
{
char szString[30];
char *szString;
int iSlotIndex;
//void FromStack( lua_State *L, int iPos );
};
/*
void OptionColumnEntry::FromStack( lua_State *L, int iPos )
{
if( lua_type(L, iPos) != LUA_TTABLE )
return;
lua_pushvalue( L, iPos );
const int iTab = lua_gettop( L );
// option name
lua_getfield( L, iTab, "Name" );
RString sName = lua_tostring( L, -1 );
szString = const_cast<char *>(sName.c_str());
lua_settop( L, iTab );
// option icon index
lua_getfield( L, iTab, "IconIndex" );
iSlotIndex = lua_tointeger( L, -1 );
lua_settop( L, iTab );
}
static vector<OptionColumnEntry> g_OptionColumnEntries;
*/
// todo: metric these? -aj
static const OptionColumnEntry g_OptionColumnEntries[] =
{