Code: Select all
CEGUI::Window* class1::createDragDropSlot(CEGUI::Window* parent, const CEGUI::UVector2& position, const CEGUI::UVector2& size, short parentname){
CEGUI::Window* slot = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticImage");
parent->addChildWindow(slot);
slot->setPosition(position);
slot->setSize(size);
slot->subscribeEvent(CEGUI::Window::EventDragDropItemEnters, CEGUI::Event::Subscriber(&class1::handleDragEnter, this));
slot->subscribeEvent(CEGUI::Window::EventDragDropItemLeaves, CEGUI::Event::Subscriber(&class2::handleDragLeave, this));
slot->subscribeEvent(CEGUI::Window::EventDragDropItemDropped, CEGUI::Event::Subscriber(&class2::handleDragDropped, this));
return slot;
}
My Question now: What is wrong by using a method from another class then the subscribing function is in?