CEGUI::String problem
Posted: Thu Aug 21, 2008 07:00
I have another problem
Program breaks down when it reaches to those line.
How can I fix them ?
Thanks in advanced.
Code: Select all
class testitem : public CEGUI::Window
{
public:
int i_no;
CEGUI::String i_ID;
CEGUI::String i_name;
int i_quantity;
};
Code: Select all
void create(int pNo,CEGUI::String pID,CEGUI::String pName,CEGUI::String pDesc)
{
CEGUI::WindowManager &wm = CEGUI::WindowManager::getSingleton();
// Item icon
testitem *w1 = static_cast<testitem*>(wm.createWindow("TaharezLook/StaticImage","Item/Img:" + pID));
w1->setArea(CEGUI::UDim(0,0),CEGUI::UDim(0,0),CEGUI::UDim(1,0),CEGUI::UDim(1,0));
w1->setProperty("Image","set:MenuHotkey image:mmnF01Normal");
w1->setProperty("MousePassThroughEnabled","true");
w1->i_no = pNo;
w1->i_ID = pID; // Program breaks here
w1->i_name = pName;
w1->i_quantity = 0;
....
Code: Select all
item items;
items.create(1,"0001","Potion 1","Potion for use");
items.create(2,"0002","Potion 2","Potion for use");
Program breaks down when it reaches to those line.
How can I fix them ?
Thanks in advanced.