diff --git a/src/ModIconRow.cpp b/src/ModIconRow.cpp index aae4517466..362c5a8e4d 100644 --- a/src/ModIconRow.cpp +++ b/src/ModIconRow.cpp @@ -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(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 g_OptionColumnEntries; +*/ + // todo: metric these? -aj static const OptionColumnEntry g_OptionColumnEntries[] = {