本文整理汇总了C++中cegui::Window::subscribeEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::subscribeEvent方法的具体用法?C++ Window::subscribeEvent怎么用?C++ Window::subscribeEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::subscribeEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
PauseState::PauseState()
{
m_bQuit = false;
m_bQuestionActive = false;
m_FrameEvent = Ogre::FrameEvent();
// Create CEGUI interface!
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
sheet = wmgr.createWindow("DefaultWindow", "PauseMenu/Sheet");
CEGUI::Window *resume = wmgr.createWindow("TaharezLook/Button", "PauseMenu/ResumeButton");
resume->setText("Resume");
resume->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.4, 0), CEGUI::UDim( 0.45, 0)));
resume->setSize(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.04, 0)));
resume->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &PauseState::onResume, this));
CEGUI::Window *menu = wmgr.createWindow("TaharezLook/Button", "PauseMenu/MenuButton");
menu->setText("Back To Menu");
menu->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.4, 0), CEGUI::UDim( 0.5, 0)));
menu->setSize(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.04, 0)));
menu->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &PauseState::onMenu, this));
sheet->addChildWindow(resume);
sheet->addChildWindow(menu);
}
示例2: showMenuCegui
void MenuState::showMenuCegui()
{
//Sheet
CEGUI::Window* _ceguiSheet = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow","menu_principal");
//Config Window
CEGUI::Window* menuWin = CEGUI::WindowManager::getSingleton().loadLayoutFromFile("menu_principal.layout");
// NEW GAME
CEGUI::Window* newGameButton = menuWin->getChild("btn_new_game");
newGameButton->subscribeEvent( CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&MenuState::newGame, this));
// RECORDS
CEGUI::Window* recordsButton = menuWin->getChild("btn_records");
recordsButton->subscribeEvent( CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&MenuState::records, this));
// CREDITS
CEGUI::Window* creditsButton = menuWin->getChild("btn_credits");
creditsButton->subscribeEvent( CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&MenuState::credits, this));
// QUIT
CEGUI::Window* exitButton = menuWin->getChild("btn_quit");
exitButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&MenuState::quit, this));
//Attaching buttons
_ceguiSheet->addChild(menuWin);
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(_ceguiSheet);
}
示例3: Record
void
EndState::enter ()
{
_root = Ogre::Root::getSingletonPtr();
_sceneMgr = _root->getSceneManager("SceneManager");
_camera = _sceneMgr->getCamera("IntroCamera");
_viewport = _root->getAutoCreatedWindow()->getViewport(0);
_pSoundFXManager = SoundFXManager::getSingletonPtr();
_simpleEffect = _pSoundFXManager->load("gameover.ogg");
_simpleEffect->play();
_exitGame = _save = false;
_rec = new Record();
//CEGUI
CEGUI::System::getSingleton().getDefaultGUIContext().getMouseCursor().show();
_sheet = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow","Menu");
//Config Window
CEGUI::Window* configWin = CEGUI::WindowManager::getSingleton().loadLayoutFromFile("end.layout");
CEGUI::Window* mark = configWin->getChild("MarkValue");
mark->setText(Ogre::StringConverter::toString(_score));
_nick = configWin->getChild("Nick");
_nick->subscribeEvent(CEGUI::Window::EventMouseButtonDown,
CEGUI::Event::Subscriber(&EndState::clear, this));
CEGUI::Window* menuButton = configWin->getChild("MenuButton");
menuButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&EndState::save, this));
CEGUI::Window* exitButton = configWin->getChild("ExitButton");
exitButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&EndState::quit, this));
//Attaching buttons
_sheet->addChild(configWin);
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(_sheet);
}
示例4: createGUI
void NextLevelState::createGUI()
{
//CEGUI
_sheet = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow","Menu");
//Config Window
CEGUI::Window* configWin = CEGUI::WindowManager::getSingleton().loadLayoutFromFile("next.layout");
CEGUI::Window* playButton = configWin->getChild("PlayButton");
playButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::play, this));
/*CEGUI::Window* saveButton = configWin->getChild("SaveButton");
saveButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::save, this));
CEGUI::Window* loadButton = configWin->getChild("LoadButton");
loadButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::load, this));*/
CEGUI::Window* helpButton = configWin->getChild("HelpButton");
helpButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::help, this));
CEGUI::Window* menuButton = configWin->getChild("MenuButton");
menuButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::menu, this));
CEGUI::Window* exitButton = configWin->getChild("ExitButton");
exitButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&NextLevelState::quit, this));
//Attaching buttons
_sheet->addChild(configWin);
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(_sheet);
}
示例5:
MenuState::MenuState()
{
m_bQuit = false;
m_FrameEvent = Ogre::FrameEvent();
// Create CEGUI interface!
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
sheet = wmgr.createWindow( "DefaultWindow", "MainMenu/Sheet");
CEGUI::ImagesetManager::getSingleton().createFromImageFile("BG", "mainMenuBackground.png");
CEGUI::Window* menuBackground = wmgr.createWindow("TaharezLook/StaticImage", "MainMenu/BG");
menuBackground->setProperty( "Image", "set:BG image:full_image");
menuBackground->setSize(CEGUI::UVector2(CEGUI::UDim(0.0, 1440.0), CEGUI::UDim(0.0, 900.0)));
menuBackground->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, 0.0), CEGUI::UDim( 0.0, 0.0)));
menuBackground->setProperty( "FrameEnabled", "False");
CEGUI::ImagesetManager::getSingleton().createFromImageFile("Loading", "loading.png");
loading = wmgr.createWindow("TaharezLook/StaticImage", "MainMenu/Loading");
loading->setProperty( "Image", "set:Loading image:full_image");
loading->setSize(CEGUI::UVector2(CEGUI::UDim(0.0, 512.0), CEGUI::UDim(0.0, 128.0)));
loading->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5, -256.0), CEGUI::UDim( 0.5, -64.0)));
loading->setProperty( "FrameEnabled", "False");
loading->setProperty( "BackgroundEnabled", "False");
CEGUI::ImagesetManager::getSingleton().createFromImageFile("NeuroPulseLogo", "neuroPulseLogo_1.png");
CEGUI::Window* neuroPulseLogo = wmgr.createWindow("TaharezLook/StaticImage", "MainMenu/Logo");
neuroPulseLogo->setProperty( "Image", "set:NeuroPulseLogo image:full_image");
neuroPulseLogo->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5, -275.0), CEGUI::UDim( 0.1, 0)));
neuroPulseLogo->setSize(CEGUI::UVector2(CEGUI::UDim(0.0, 550.0), CEGUI::UDim(0.0, 200.0)));
neuroPulseLogo->setProperty( "FrameEnabled", "False");
neuroPulseLogo->setProperty( "BackgroundEnabled", "False");
CEGUI::Window *play = wmgr.createWindow("TaharezLook/Button", "MainMenu/PlayButton");
play->setText("Play");
play->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.4, 0), CEGUI::UDim( 0.45, 0)));
play->setSize(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.04, 0)));
play->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &MenuState::onPlay, this));
CEGUI::Window *options = wmgr.createWindow("TaharezLook/Button", "MainMenu/OptionsButton");
options->setText("Options");
options->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.4, 0), CEGUI::UDim( 0.5, 0)));
options->setSize(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.04, 0)));
options->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &MenuState::onOptions, this));
CEGUI::Window *quit = wmgr.createWindow("TaharezLook/Button", "MainMenu/QuitButton");
quit->setText("Quit");
quit->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.4, 0), CEGUI::UDim( 0.55, 0)));
quit->setSize(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.04, 0)));
quit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &MenuState::onQuit, this));
sheet->addChildWindow(menuBackground);
sheet->addChildWindow(neuroPulseLogo);
sheet->addChildWindow(play);
sheet->addChildWindow(options);
sheet->addChildWindow(quit);
}
示例6: setupButtonClickHandlers
void GameMenuDemo::setupButtonClickHandlers()
{
CEGUI::Window* buttonSave = d_root->getChild("InnerButtonsContainer/ButtonSave");
buttonSave->subscribeEvent(CEGUI::Window::EventMouseClick, Event::Subscriber(&GameMenuDemo::handleStartPopupLinesSaveDisplay, this));
CEGUI::Window* buttonLoad = d_root->getChild("InnerButtonsContainer/ButtonLoad");
buttonLoad->subscribeEvent(CEGUI::Window::EventMouseClick, Event::Subscriber(&GameMenuDemo::handleStartPopupLinesLoadDisplay, this));
CEGUI::Window* buttonCharacters = d_root->getChild("InnerButtonsContainer/ButtonCharacters");
buttonCharacters->subscribeEvent(CEGUI::Window::EventMouseClick, Event::Subscriber(&GameMenuDemo::handleStartPopupLinesCharactersDisplay, this));
CEGUI::Window* buttonOptions = d_root->getChild("InnerButtonsContainer/ButtonOptions");
buttonOptions->subscribeEvent(CEGUI::Window::EventMouseClick, Event::Subscriber(&GameMenuDemo::handleStartPopupLinesOptionsDisplay, this));
CEGUI::Window* buttonQuit = d_root->getChild("InnerButtonsContainer/ButtonQuit");
buttonQuit->subscribeEvent(CEGUI::Window::EventMouseClick, Event::Subscriber(&GameMenuDemo::handleStartPopupLinesQuitDisplay, this));
}
示例7:
fruitapp::gui::ce::button::button(
fruitlib::audio::sound_controller &_sound_controller,
CEGUI::Window &_window)
:
sound_controller_(
_sound_controller
),
push_connection_(
_window.subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(
[
this
](
CEGUI::EventArgs const &
)
-> bool
{
push_signal_();
sound_controller_.play(
fruitlib::resource_tree::path(
FCPPT_TEXT("button_clicked")
)
);
return
true;
}
)
)
),
hover_connection_(
_window.subscribeEvent(
CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(
[](
CEGUI::EventArgs const &
)
-> bool
{
return
true;
}
)
)
),
push_signal_()
{
}
示例8: createScorePopup
void HUDDemo::createScorePopup(const CEGUI::Vector2<float>& mousePos, int points)
{
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* popupWindow = winMgr.createWindow("HUDDemo/PopupLabel");
d_rootIngame->addChild(popupWindow);
popupWindow->setPosition(CEGUI::UVector2(cegui_absdim(mousePos.d_x), cegui_absdim(mousePos.d_y)));
popupWindow->setText(CEGUI::PropertyHelper<int>::toString(points));
popupWindow->setRiseOnClickEnabled(false);
popupWindow->subscribeEvent(AnimationInstance::EventAnimationEnded, Event::Subscriber(&HUDDemo::handleScorePopupAnimationEnded, this));
popupWindow->setPixelAligned(false);
popupWindow->setFont("DejaVuSans-14");
popupWindow->setPosition(popupWindow->getPosition() + CEGUI::UVector2(cegui_reldim(0.03f), cegui_reldim(-0.02f)));
if(points < 0)
popupWindow->setProperty("NormalTextColour", "FF880000");
else
{
popupWindow->setText( "+" + popupWindow->getText());
popupWindow->setProperty("NormalTextColour", "FF006600");
}
CEGUI::EventArgs args;
popupWindow->fireEvent("StartAnimation", args);
}
示例9: USize
bool
IntroState::info(const CEGUI::EventArgs &e)
{
CEGUI::Window* sheet=CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow();
_credits=false;
_options=false;
_info=true;
//Sheet Creditos
Window* sheetBG = WindowManager::getSingleton().createWindow("TaharezLook/StaticImage","background_info");
sheetBG->setPosition( UVector2(cegui_reldim(0),cegui_reldim(0)));
sheetBG->setSize( USize(cegui_reldim(1),cegui_reldim(1)));
sheetBG->setProperty("Image","BackgroundImageControls");
sheetBG->setProperty("FrameEnabled","False");
sheetBG->setProperty("BackgroundEnabled", "False");
CEGUI::Window* backButton = CEGUI::WindowManager::getSingleton().createWindow("OgreTray/Button","back");
backButton->setText("[font='DickVanDyke'] Back ");
backButton->setSize(CEGUI::USize(CEGUI::UDim(0.23,0),CEGUI::UDim(0.07,0)));
backButton->setXPosition(UDim(0.66f, 0.0f));
backButton->setYPosition(UDim(0.85f, 0.0f));
backButton->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&IntroState::back,this));
sheetBG->addChild(backButton);
sheet->addChild(sheetBG);
return true;
}
示例10: createGUIInfo
void PlayState::createGUIInfo()
{
CEGUI::Window* btnNext = CEGUI::WindowManager::getSingleton ().createWindow ("TaharezLook/Button", "HLF/NextButton");
btnNext->setText ("NEXT");
btnNext->setSize (CEGUI::USize (CEGUI::UDim (0.15, 0), CEGUI::UDim (0.05, 0)));
btnNext->setPosition (CEGUI::UVector2 (CEGUI::UDim (0.01,0), CEGUI::UDim (0.01, 0)));
btnNext->subscribeEvent (CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber (&PlayState::siguiente, this));
CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->addChild(btnNext);
CEGUI::Window* txtPuntos = CEGUI::WindowManager::getSingleton().createWindow ("TaharezLook/StaticText", "txtPuntos");
std::stringstream s;
s << "Puntos: " << _jugadores[_idJugador]->_puntuacion;
txtPuntos->setText (s.str());
txtPuntos->setSize (CEGUI::USize (CEGUI::UDim (0.15, 0), CEGUI::UDim (0.05, 0)));
txtPuntos->setPosition (CEGUI::UVector2 (CEGUI::UDim (0.20,0), CEGUI::UDim (0.01, 0)));
CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->addChild(txtPuntos);
CEGUI::Window* txtMov = CEGUI::WindowManager::getSingleton().createWindow ("TaharezLook/StaticText", "txtMov");
s.str("");;
s << "Movimiento: [" << _jugadores[_idJugador]->_casillaTiro.x << "," << _jugadores[_idJugador]->_casillaTiro.y << "]";
txtMov->setText (s.str());
txtMov->setSize (CEGUI::USize (CEGUI::UDim (0.30, 0), CEGUI::UDim (0.05, 0)));
txtMov->setPosition (CEGUI::UVector2 (CEGUI::UDim (0.39,0), CEGUI::UDim (0.01, 0)));
CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->addChild(txtMov);
}
示例11: SetButtons
void MessageBox::SetButtons(const MessageBoxButtons& buttons)
{
float32 sumWidth = 0;
for (MessageBoxButtons::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
{
CEGUI::Window* button = GetButton(*it);
OC_DASSERT(button != 0);
float32 width = button->getWidth().d_offset;
sumWidth += width;
}
float32 totalWidth = sumWidth + BUTTON_MARGIN * (buttons.size() - 1);
float32 left = 0;
for (MessageBoxButtons::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
{
CEGUI::Window* button = GetButton(*it);
OC_DASSERT(button != 0);
float32 width = button->getWidth().d_offset;
button->setPosition(CEGUI::UVector2(CEGUI::UDim(0.5f, -0.5f * totalWidth + left), button->getPosition().d_y));
button->setWidth(CEGUI::UDim(0, width));
button->setVisible(true);
button->setID((CEGUI::uint)*it);
button->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GUISystem::MessageBox::OnButtonClicked, this));
left += width + BUTTON_MARGIN;
}
mMinWidth = totalWidth + 2.0f * BUTTON_MARGIN;
}
示例12: createScene
//-------------------------------------------------------------------------------------
void TutorialApplication::createScene(void)
{
mRenderer = &CEGUI::OgreRenderer::bootstrapSystem();
CEGUI::ImageManager::setImagesetDefaultResourceGroup("Imagesets");
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
CEGUI::SchemeManager::getSingleton().createFromFile("TaharezLook.scheme");
CEGUI::System::getSingleton().getDefaultGUIContext().getMouseCursor().setDefaultImage("TaharezLook/MouseArrow");
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window *sheet = wmgr.createWindow("DefaultWindow", "Main");
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(sheet);
CEGUI::Window *quit = wmgr.createWindow("TaharezLook/Button", "QuitButton");
quit->setText("Quit");
quit->setSize(CEGUI::USize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.05, 0)));
quit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&TutorialApplication::quit, this));
sheet->addChild(quit);
}
示例13: Input_InputModeChanged
void ActiveWidgetHandler::Input_InputModeChanged(Input::InputMode mode)
{
if (mode != Input::IM_GUI && mLastMode == Input::IM_GUI) {
//save the current active widget
CEGUI::Window* window = mGuiManager.getMainSheet()->getActiveChild();
if (window) {
mLastActiveWindow = window;
mLastActiveWindowDestructionStartedConnection = window->subscribeEvent(CEGUI::Window::EventDestructionStarted, CEGUI::Event::Subscriber(&ActiveWidgetHandler::lastActiveWindowDestructionStarted, this));
window->deactivate();
//deactivate all parents
while ((window = window->getParent())) {
window->deactivate();
}
} else {
mLastActiveWindow = nullptr;
}
mLastMode = mode;
} else if (mode == Input::IM_GUI) {
if (mLastActiveWindow) {
//restore the previously active widget
try {
mLastActiveWindow->activate();
} catch (...)
{
S_LOG_WARNING("Error when trying to restore previously captured window.");
}
mLastActiveWindow = 0;
mLastActiveWindowDestructionStartedConnection->disconnect();
}
mLastMode = mode;
}
}
示例14: getTabControl
DynamicEditor::DynamicEditor(FreeCamera* camera, EditorMode* _mode)
:editorModes
({
{{"position","dimensions"}, new DynamicEditor::DerivedModeFactory<BoxDragMode>()},
{{"points"}, new DynamicEditor::DerivedModeFactory<PointGeometryMode>()},
{{"position", "radius"}, new DynamicEditor::DerivedModeFactory<CircleDragMode>()},
{{"position"}, new DynamicEditor::DerivedModeFactory<ClickPlaceMode>()},
}),
editorVariables
({
{"skin", new ComponentObjectSelectionVariableFactory<Skin>("skin","StaticSkinFactory")},
}),
params(nullptr)
{
//ctor
//entityList = new EntityList("Root/EntityList/Listbox");
camera->activate();
mCamera = camera;
instanceTab = getTabControl("Root/Entities");
typeTab = getTabControl("Root/EntityTypes");
entityName = CEGUI::System::getSingleton().getGUISheet()->getChildRecursive("Root/Entities/EntityName");
//nameVariableController = new NameVariableController(entityName, ¶ms);
nameVariableControllerFactory = new NameVariableControllerFactory("ThisIsAName", entityName);
assert(entityName);
instanceTab->getParent()->setEnabled(false);
typeTab->getParent()->setEnabled(false);
instanceTab->getParent()->setVisible(false);
typeTab->getParent()->setVisible(false);
CEGUI::Window* button = typeTab->getParent()->getChild("Root/EntityTypes/CreateButton");
button->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::SubscriberSlot(&DynamicEditor::createFactory,this));
editorMode = _mode;
}
示例15: ResizeInventory
/***********************************************************
resize inventory
***********************************************************/
void ContainerBox::ResizeInventory(int newsize)
{
if(_inventory_size == newsize)
return;
_inventory_size = newsize;
for(size_t i=0; i<_inv_boxes.size(); ++i)
_inv_boxes[i]->destroy();
_inv_boxes.clear();
CEGUI::Window* pane = CEGUI::WindowManager::getSingleton().getWindow("ContainerFrame/InvScrollable");
CEGUI::Window* tmpwindow;
for(int i=0; i<_inventory_size; ++i)
{
int x = i / 4;
int y = i % 4;
tmpwindow = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText");
tmpwindow->setArea(CEGUI::UDim(0,5+((float)_boxsize+2)*y), CEGUI::UDim(0,5+((float)_boxsize+2.0f)*x),
CEGUI::UDim(0, (float)_boxsize), CEGUI::UDim(0, (float)_boxsize));
pane->addChildWindow(tmpwindow);
tmpwindow->subscribeEvent(
CEGUI::Window::EventDragDropItemDropped,
CEGUI::Event::Subscriber(&ContainerBox::handle_ItemDroppedInInventory, this));
tmpwindow->setID(i);
_inv_boxes.push_back(tmpwindow);
}
CleanInventory();
}