In lua, i can call the function"createListboxTextItem(..)" to new a listboxTextItem;
Now, i created a new class called FormattedListboxItem inherited from ListboxTextItem, and I want to call the function"createFormattedListboxItem()" to new a formattedListboxItem in lua.
Question is how to achive that?
ps:
in <required.h> ,i added this:
Code: Select all
FormattedListboxTextItem* ceguiLua_createFormattedListboxTextItem(const String& text,const HorizontalTextFormatting format,uint item_id, void* item_data, bool disabled, bool auto_delete)
in <required.h>:
Code: Select all
FormattedListboxTextItem* ceguiLua_createFormattedListboxTextItem(const String& text, const HorizontalTextFormatting format,uint item_id, void* item_data, bool disabled, bool auto_delete)
{
return new FormattedListboxTextItem(text,format,item_id,item_data,disabled,auto_delete);
}
Of course ,that's not enough! lua_CEGUI.cpp is automatically generated,and i don't know how?
So,what exactly do I need to do? Hope, someone help me ,and thanks in andvance,
