The ItemBox from demo is very hard: there are many classes for this easy thing.
I've crated ItemBox(I see it on the screen). And I would like to add ImageBox on it.
In follow code i is a for-loop variable
Code: Select all
auto item = new MyGUI::ImageBox();
item->setImageTexture("photo.png");
itemBox->insertItemAt(i,item);
I've tried to create item like this:
Code: Select all
auto item = itemBox->createWidget<MyGUI::ImageBox>("ImageBox",
itemBox->getHeight() * i,0,
itemBox->getHeight() / 2,itemBox->getHeight() / 2,
MyGUI::Align::Default, "");