thinking of how to expose this to Lua...
This commit is contained in:
+26
-1
@@ -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[] =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user