本文整理汇总了C++中cegui::Window::addChildWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::addChildWindow方法的具体用法?C++ Window::addChildWindow怎么用?C++ Window::addChildWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::addChildWindow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createGUIWindow
/**
* Create all widgets and their initial contents.
*
* CEGUI is based on tree structure of Windows. On top of that
* tree is a GUISheet, named "root". Each child has a position and
* a size - both given as values relative to the parent elements area.
* Position is given as the top left corner of a child within the parent area.
* Size is given as the relative portions of the parent area.
*/
void createGUIWindow()
{
CEGUI::System *ceguiSystem= CEGUI::System::getSingletonPtr();
assert(ceguiSystem);
CEGUI::WindowManager *winMgr = CEGUI::WindowManager::getSingletonPtr();
assert(winMgr);
CEGUI::Window *ceguiRoot = winMgr->createWindow("DefaultGUISheet","root");
assert(ceguiRoot);
ceguiSystem->setGUISheet(ceguiRoot); // Top element, fills the display area
CEGUI::UVector2 buttonSize = CEGUI::UVector2(CEGUI::UDim(0.6, 0), CEGUI::UDim(0.1, 0));
setupCEGUIResources();
// Create a button of type "TaharezLook/Button" and name "root/Button"
mButton = winMgr->createWindow(
reinterpret_cast<const CEGUI::utf8*>("TaharezLook/Button"),
reinterpret_cast<const CEGUI::utf8*>("root/Button"));
mButton->setAlpha(0.5f);
mButton->setText("Hello World!");
mButton->setSize(buttonSize);
mButton->setPosition(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.6, 0)));
mEditBox = winMgr->createWindow(
reinterpret_cast<const CEGUI::utf8*>("TaharezLook/Editbox"),
reinterpret_cast<const CEGUI::utf8*>("root/EditBox"));
mEditBox->setAlpha(0.5f);
mEditBox->setSize(CEGUI::UVector2(CEGUI::UDim(0.6, 0), CEGUI::UDim(0.1, 0)));
mEditBox->setPosition(CEGUI::UVector2(CEGUI::UDim(0.2, 0), CEGUI::UDim(0.3, 0)));
// Add both created elements to the GUI sheet.
ceguiRoot->addChildWindow(mEditBox);
ceguiRoot->addChildWindow(mButton);
/* Add event subscribers to both elements.
* CEGUI input handling is based on function pointers being subscribed
* to certain events - events of each window type are defined in the
* CEGUI API docs. When the event occurs, all subscriber functions
* are called (in some order?)
*/
// EventTextAccepted occurs when input box has focus, and user presses
// Enter, Return or Tab, and so accepts the input.
mEditBox->subscribeEvent(CEGUI::Editbox::EventTextAccepted,
CEGUI::Event::Subscriber(&inputEntered));
// EventClicked occurs when button is clicked.
mButton->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&inputEntered));
}
示例2:
Dan2::Dan2(DanListener * listener):KeyListener(true),_n(0), _time(-1.f),_callback(listener)
{
_win= CEGUI::WindowManager::getSingleton().loadWindowLayout("Dan2.layout");
_win->setAlwaysOnTop(true);
_win->hide();
CEGUI::Window * f = CEGUI::WindowManager::getSingleton().getWindow("AnimalUI");
f->addChildWindow(_win);
for(int i = 0; i<9; ++i)
{
_editboxs[i] = static_cast<CEGUI::Editbox*>(CEGUI::WindowManager::getSingleton().getWindow("Dan2/Bg/" + Ogre::StringConverter::toString(i+1)));
_editboxs[i]->setMaxTextLength(1);
_editboxs[i]->subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&Dan2::textAccepted, this));
}
_editboxs[0]->setValidationString("[1-7]*");
_editboxs[1]->setValidationString("[1-4]*");
_editboxs[2]->setValidationString("[1-4]*");
_editboxs[3]->setValidationString("[1-6]*");
_editboxs[4]->setValidationString("[0-3]*");
_editboxs[5]->setValidationString("[0-9]*");
_editboxs[6]->setValidationString("[1-5]*");
_editboxs[7]->setValidationString("[1-9]*");
_editboxs[8]->setValidationString("[1-7]*");
}
示例3: 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();
}
示例4: enableFloatingPointExceptions
//------------------------------------------------------------------------------
GUITeamSelect::GUITeamSelect(PuppetMasterClient * puppet_master) :
puppet_master_(puppet_master)
{
enableFloatingPointExceptions(false);
CEGUI::WindowManager& wm = CEGUI::WindowManager::getSingleton();
/// XXX hack because root window is stored inside metatask, no easy way to retrieve it
CEGUI::Window * parent = wm.getWindow("TankApp_root/");
// Use parent window name as prefix to avoid name clashes
root_ = wm.loadWindowLayout("teamselectmenu.layout", parent->getName());
menu_window_ = (CEGUI::Window*) wm.getWindow(parent->getName() + "teamselectmenu/menu");
menu_btn_[0] = (CEGUI::ButtonBase*) wm.getWindow(parent->getName() + "teamselectmenu/btn1");
menu_btn_[1] = (CEGUI::ButtonBase*) wm.getWindow(parent->getName() + "teamselectmenu/btn2");
menu_btn_spec_ = (CEGUI::ButtonBase*) wm.getWindow(parent->getName() + "teamselectmenu/btn3");
menu_btn_text_[0] = (CEGUI::ButtonBase*) wm.getWindow(parent->getName() + "teamselectmenu/btn1/text");
menu_btn_text_[1] = (CEGUI::ButtonBase*) wm.getWindow(parent->getName() + "teamselectmenu/btn2/text");
// add score to widget tree
parent->addChildWindow(menu_window_);
menu_window_->setVisible(false);
registerCallbacks();
enableFloatingPointExceptions();
s_input_handler.registerInputCallback("Change Team",
input_handler::SingleInputHandler(this, &GUITeamSelect::toggleShow),
&fp_group_);
}
示例5: setupCEGUI
void Application::setupCEGUI()
{
// CEGUI setup
m_renderer = new CEGUI::OgreCEGUIRenderer(m_window, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, m_sceneManager);
m_system = new CEGUI::System(m_renderer);
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLookSkin.scheme");
m_system->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
m_system->setDefaultFont((CEGUI::utf8*)"BlueHighway-12");
CEGUI::WindowManager *win = CEGUI::WindowManager::getSingletonPtr();
CEGUI::Window *sheet = win->createWindow("DefaultGUISheet", "Sheet");
float distanceBorder = 0.01;
float sizeX = 0.2;
float sizeY = 0.05;
float posX = distanceBorder;
float posY = distanceBorder;
debugWindow = win->createWindow("TaharezLook/StaticText", "Widget1");
debugWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(posX, 0), CEGUI::UDim(posY, 0)));
debugWindow->setSize(CEGUI::UVector2(CEGUI::UDim(sizeX, 0), CEGUI::UDim(sizeY, 0)));
debugWindow->setText("Debug Info!");
sheet->addChildWindow(debugWindow);
m_system->setGUISheet(sheet);
}
示例6:
_MEMBER_FUNCTION_IMPL(GUIElement, setParent)
{
const char * parent;
sq_getstring(pVM, -1, &parent);
CGUIFrameWindow * pWindow = sq_getinstance<CGUIFrameWindow *>(pVM);
if(!pWindow)
{
sq_pushbool(pVM, false);
return 1;
}
CEGUI::Window * pParentWindow = NULL;
try
{
pParentWindow = g_pClient->GetGUI()->GetWindowManager()->getWindow(parent);
}
catch(CEGUI::UnknownObjectException &e)
{
(void)e;
sq_pushbool(pVM, false);
return 1;
}
pParentWindow->addChildWindow(pWindow);
sq_pushbool(pVM, true);
return 1;
}
示例7: line
Dan::Dan(DanListener * listener):_time(-1.f),_callback(listener)
{
_win= CEGUI::WindowManager::getSingleton().loadWindowLayout("dan.layout");
_win->setAlwaysOnTop(true);
_win->hide();
CEGUI::Window * f = CEGUI::WindowManager::getSingleton().getWindow("AnimalUI");
f->addChildWindow(_win);
for(int i = 0; i < 10; i++)
{
std::string n = boost::lexical_cast<std::string>(i);
LinePtr line(new DanLine());
for(int j=0;j<9; ++j)
{
//std::cout<<"Dan/Bg/Line0/Tt" + n + boost::lexical_cast<std::string>(j)<<std::endl;
line->push_back(CEGUI::WindowManager::getSingleton().getWindow("Dan/Bg/Line0/Tt" + n + boost::lexical_cast<std::string>(j)));
}
_lines.push_back(line);
}
}
示例8: catch
bool
CFormBackendImp::LoadLayout( GUCEF::CORE::CIOAccess& layoutStorage )
{GUCE_TRACE;
CEGUI::Window* rootWindow = NULL;
CEGUI::WindowManager* wmgr = CEGUI::WindowManager::getSingletonPtr();
GUCEF_DEBUG_LOG( 0, "Starting layout load for a GUI Form" );
try
{
// provide hacky access to the given data
m_dummyArchive->AddResource( layoutStorage, "currentFile" );
// Now we can load the window layout from the given storage
// Note that if CEGUI ever provides an interface to do this directly
// clean up this mess !!!
rootWindow = wmgr->loadWindowLayout( "currentFile" ,
m_widgetNamePrefix.C_String() ,
m_resourceGroupName.C_String() );
m_dummyArchive->ClearResourceList();
}
catch ( Ogre::Exception& e )
{
GUCEF_ERROR_LOG( 0, CString( "Ogre Exception while attempting to load form layout: " ) + e.getFullDescription().c_str() );
return false;
}
// Now that we completed loading lets see what we got from CEGUI
if ( NULL != rootWindow )
{
// Begin by providing a wrapper for the root window
m_rootWindow = CreateAndHookWrapperForWindow( rootWindow );
if ( NULL != m_rootWindow )
{
CString localWidgetName = m_rootWindow->GetName().SubstrToChar( '/', false );
m_widgetMap[ localWidgetName ] = m_rootWindow;
WrapAndHookChildWindows( rootWindow );
// We will directly add the form as a child of the root for now
CEGUI::Window* globalRootWindow = wmgr->getWindow( "root" );
if ( NULL != globalRootWindow )
{
globalRootWindow->addChildWindow( rootWindow );
GUCEF_DEBUG_LOG( 0, "Successfully loaded a GUI Form layout" );
return true;
}
else
{
GUCEF_ERROR_LOG( 0, "Failed to add form as a child to the global \"root\" window" );
}
}
rootWindow->hide();
}
GUCEF_DEBUG_LOG( 0, "Failed to loaded a GUI Form layout" );
return false;
}
示例9: init
void McsHudGui::init()
{
CEGUI::MouseCursor::getSingleton().hide();
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window *sheet = wmgr.createWindow("DefaultWindow", "MCSHudDefault/DefaultHud");
CEGUI::Window *crosshair = wmgr.createWindow("Vanilla/StaticImage", "MCSHud/Crosshair");
crosshair->setProperty("Image", "set:HudImages image:cross");
crosshair->setSize(CEGUI::UVector2(CEGUI::UDim(0, 32), CEGUI::UDim(0, 32)));
crosshair->setPosition(CEGUI::UVector2(CEGUI::UDim(0.5f, -16), CEGUI::UDim(0.5f, -16)));
crosshair->setProperty("BackgroundEnabled", "False");
crosshair->setProperty("FrameEnabled", "False");
mFpsText = wmgr.createWindow("Vanilla/StaticText", "MCSHud/FpsText");
mFpsText->setAlpha(0.6f);
mFpsText->setText("");
mFpsText->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0f, 5), CEGUI::UDim(0.0f, 5)));
mFpsText->setSize(CEGUI::UVector2(CEGUI::UDim(0.4f, 0), CEGUI::UDim(0.04f, 0)));
mFpsText->setProperty("BackgroundEnabled", "False");
mFpsText->setProperty("FrameEnabled", "False");
mPosText = wmgr.createWindow("Vanilla/StaticText", "MCSHud/PosText");
mPosText->setAlpha(0.6f);
mPosText->setText("");
mPosText->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0f, 5), CEGUI::UDim(0.04f, 5)));
mPosText->setSize(CEGUI::UVector2(CEGUI::UDim(0.4f, 0), CEGUI::UDim(0.04f, 0)));
mPosText->setProperty("BackgroundEnabled", "False");
mPosText->setProperty("FrameEnabled", "False");
mHitPosText = wmgr.createWindow("Vanilla/StaticText", "MCSHud/HitPosText");
mHitPosText->setAlpha(0.6f);
mHitPosText->setText("");
mHitPosText->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0f, 5), CEGUI::UDim(0.08f, 5)));
mHitPosText->setSize(CEGUI::UVector2(CEGUI::UDim(0.4f, -5), CEGUI::UDim(0.04f, 0)));
mHitPosText->setProperty("BackgroundEnabled", "False");
mHitPosText->setProperty("FrameEnabled", "False");
addFrameGraph(sheet);
sheet->addChildWindow(crosshair);
sheet->addChildWindow(mFpsText);
sheet->addChildWindow(mPosText);
sheet->addChildWindow(mHitPosText);
CEGUI::System::getSingleton().setGUISheet(sheet);
}
示例10: UpdateFolderList
void GUISystem::FolderSelector::Show(const CEGUI::String& windowTitle, bool showEditbox, const CEGUI::String& editboxLabel)
{
bool success = false;
OC_CEGUI_TRY;
{
CEGUI::Window* root = gGUIMgr.GetGUISheet();
mWindow = gGUIMgr.LoadSystemLayout("FolderSelector.layout", root->getName() + "/");
mWindow->setAlwaysOnTop(true);
mWindow->setModalState(true);
root->addChildWindow(mWindow);
CEGUI::Window* frame = mWindow->getChild(root->getName() + "/FolderSelector/Frame");
frame->setText(windowTitle);
mButtonOK = frame->getChild(root->getName() + "/FolderSelector/ButtonOK");
mButtonCancel = frame->getChild(root->getName() + "/FolderSelector/ButtonCancel");
mPathBox = frame->getChild(root->getName() + "/FolderSelector/PathBox");
mFolderList = static_cast<CEGUI::Listbox*>(frame->getChild(root->getName() + "/FolderSelector/FolderList"));
mFolderList->setWantsMultiClickEvents(true);
mEditbox = frame->getChild(root->getName() + "/FolderSelector/Editbox");
mEditbox->subscribeEvent(CEGUI::Editbox::EventKeyDown,
CEGUI::Event::Subscriber(&GUISystem::FolderSelector::OnEditboxKeyDown, this));
mButtonOK->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&GUISystem::FolderSelector::OnButtonClicked, this));
mButtonCancel->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&GUISystem::FolderSelector::OnButtonClicked, this));
mFolderList->subscribeEvent(CEGUI::Listbox::EventMouseDoubleClick,
CEGUI::Event::Subscriber(&GUISystem::FolderSelector::OnFolderListDoubleClicked, this));
CEGUI::Window* buttonCreateDirectory = frame->getChild(root->getName() + "/FolderSelector/ButtonCreateDirectory");
buttonCreateDirectory->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&GUISystem::FolderSelector::OnCreateDirectoryClicked, this));
if (!showEditbox)
{
mEditbox->hide();
frame->getChild(root->getName() + "/FolderSelector/EditboxLabel")->hide();
}
else
{
frame->getChild(root->getName() + "/FolderSelector/EditboxLabel")->setText(editboxLabel);
mEditbox->activate();
}
UpdateFolderList();
success = true;
}
OC_CEGUI_CATCH;
if (!success)
{
ocError << "Cannot show FolderSelector.";
delete this;
}
}
示例11: createScene
void MenuState::createScene() {
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window *window = wmgr.createWindow("DefaultWindow", "CEGUI/MenuWindow");
// title logo
CEGUI::Window *si = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticImage", "TitlePng");
si->setSize(CEGUI::UVector2(CEGUI::UDim(0.8, 0), CEGUI::UDim(0.25, 0)));
si->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1, 0), CEGUI::UDim(0.05, 0)));
si->setProperty("Image","set:Title image:full_image");
si->setProperty("FrameEnabled", "False");
si->setProperty("BackgroundEnabled", "False");
window->addChildWindow(si);
// new game button
CEGUI::Window *new_game = wmgr.createWindow("TaharezLook/Button", "CEGUI/NewGameButton");
new_game->setText("Start Game");
new_game->setSize(CEGUI::UVector2(CEGUI::UDim(0.5, 0), CEGUI::UDim(0.15, 0)));
new_game->setPosition(CEGUI::UVector2(CEGUI::UDim(0.25, 0), CEGUI::UDim(0.34, 0)));
window->addChildWindow(new_game);
// how to play button
CEGUI::Window *instructions = wmgr.createWindow("TaharezLook/Button", "CEGUI/InstructionsButton");
instructions->setText("How to Play");
instructions->setSize(CEGUI::UVector2(CEGUI::UDim(0.5, 0), CEGUI::UDim(0.15, 0)));
instructions->setPosition(CEGUI::UVector2(CEGUI::UDim(0.25, 0), CEGUI::UDim(0.53, 0)));
window->addChildWindow(instructions);
// quit button
CEGUI::Window *quit = wmgr.createWindow("TaharezLook/Button", "CEGUI/QuitButton");
quit->setText("Exit Game");
quit->setSize(CEGUI::UVector2(CEGUI::UDim(0.5, 0), CEGUI::UDim(0.15, 0)));
quit->setPosition(CEGUI::UVector2(CEGUI::UDim(0.25, 0), CEGUI::UDim(0.72, 0)));
window->addChildWindow(quit);
CEGUI::System::getSingleton().setGUISheet(window);
// event calls
new_game->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::start, this));
instructions->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::instruction, this));
quit->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::quit, this));
}
示例12:
CEGUI::Window *
Records::_createRecordEntry(const std::string name, const int &points, const int &number)
{
CEGUI::Window *container = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow");
std::ostringstream tempStream;
std::string pointsString = Ogre::StringConverter::toString(points);
CEGUI::Window *nameText = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText");
nameText->setProperty("Text", "[colour='" + _configValue<std::string>("font_color_record") + "']" + name);
nameText->setProperty("Font", _configValue<std::string>("font_record"));
nameText->setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}");
CEGUI::Window *pointsText = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText");
pointsText->setProperty("Text", "[colour='" + _configValue<std::string>("font_color_record") + "']" + pointsString);
pointsText->setProperty("Font", _configValue<std::string>("font_record"));
pointsText->setProperty("UnifiedAreaRect", "{{0, 370},{0,0},{1,0},{1,0}}");
container->addChildWindow(nameText);
container->addChildWindow(pointsText);
container->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 275), CEGUI::UDim(0, -300 + number * 60)));
return container;
}
示例13: LoadMainMenu
void GUIManager::LoadMainMenu()
{
CEGUI::ImagesetManager::getSingletonPtr()->createFromImageFile("mainMenuBG","background.tga");
//add background
CEGUI::Window *mainMenu = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticImage", "mainMenu");
sheet->addChildWindow(mainMenu);
mainMenu->setSize(CEGUI::UVector2(CEGUI::UDim(1, 0), CEGUI::UDim(1, 0)));
mainMenu->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0), CEGUI::UDim(0, 0)));
mainMenu->setProperty("Image", "set:mainMenuBG image:full_image" );
mainMenu->setAlpha(1.0);
CEGUI::PushButton* login = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("WindowsLook/Button");
mainMenu->addChildWindow(login);
login->setArea(CEGUI::URect(CEGUI::UDim(0.2f,0), CEGUI::UDim(0.65f,0),
CEGUI::UDim(0.3f,0), CEGUI::UDim(0.7f,0)));
login->subscribeEvent(CEGUI::PushButton::EventActivated, CEGUI::Event::Subscriber(&GUIManager::HandleGameLoginClicked, this));
}
示例14: TR
void Editor::EditorGUI::CreatePopupMenu()
{
mNewComponentPopupMenu = gPopupMgr->CreatePopupMenu("Editor/EditorViewport/Popup/NewComponent/AutoPopup");
for (size_t i = 0; i < EntitySystem::NUM_COMPONENT_TYPES; ++i)
{
const string& componentName = EntitySystem::GetComponentTypeName((EntitySystem::eComponentType)i);
const CEGUI::String& componentMenuItemName = "Editor/EditorViewport/Popup/NewComponent/Component" + Utils::StringConverter::ToString(i);
mNewComponentPopupMenu->addChildWindow(gPopupMgr->CreateMenuItem(componentMenuItemName, componentName, "", i));
}
mPopupMenu = gPopupMgr->CreatePopupMenu("Editor/EditorViewport/Popup");
CEGUI::Window* newComponentItem = gPopupMgr->CreateMenuItem("Editor/EditorViewport/Popup/NewComponent", TR("new_component"), TR("new_component_hint"));
newComponentItem->addChildWindow(mNewComponentPopupMenu);
mPopupMenu->addChildWindow(newComponentItem);
mPopupMenu->addChildWindow(gPopupMgr->CreateMenuItem("Editor/EditorViewport/Popup/DuplicateEntity", TR("hierarchy_duplicate"), TR("hierarchy_duplicate_hint"), PI_DUPLICATE_ENTITY));
mPopupMenu->addChildWindow(gPopupMgr->CreateMenuItem("Editor/EditorViewport/Popup/DeleteEntity", TR("hierarchy_delete"), TR("hierarchy_delete_hint"), PI_DELETE_ENTITY));
mPopupMenu->addChildWindow(gPopupMgr->CreateMenuItem("Editor/EditorViewport/Popup/CreatePrototype", TR("hierarchy_prototype"), TR("hierarchy_prototype_hint"), PI_CREATE_PROTOTYPE));
}
示例15:
void Dan2::show(void)
{
if(BlackBoardSystem::getInstance().has(WheelEnum::SETUP_STR))
{
CEGUI::Window * root = CEGUI::System::getSingleton().getGUISheet();
if(root)
root->addChildWindow(_win);
SetupInfoPtr setup = BlackBoardSystem::getInstance().read<SetupInfoPtr>(WheelEnum::SETUP_STR);
for(size_t i=0; i< setup->size(); ++i)
{
setDan2Data(i, setup->at(i));
}
}
Orz::IInputManager::getSingleton().addKeyListener(this);
_win->show();
_n = 0;
redo(_n, _n);
}