本文整理汇总了C++中cegui::PushButton类的典型用法代码示例。如果您正苦于以下问题:C++ PushButton类的具体用法?C++ PushButton怎么用?C++ PushButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PushButton类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OnPageLoad
void CREvent::OnPageLoad(GamePage *pPage)
{
pPage->LoadPageWindow();
CEGUI::Window *pPageWin = pPage->GetPageWindow();
CEGUI::PushButton* pCreateBtn = static_cast<CEGUI::PushButton*>(pPageWin->getChild("CreateRole"));
pCreateBtn->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&CREvent::OnCreateRoleBtn, this));
CEGUI::PushButton* pGoBackBtn = static_cast<CEGUI::PushButton*>(pPageWin->getChildRecursive("BackToSelRol"));
pGoBackBtn->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&CREvent::GoBackBtn,this));
SetCreateRoleInitProperty(pPageWin);
m_bRoleLeftRotate = false; //向左旋转
m_bRoleRightRotate = false; //向右旋转
if (m_SelectSence == NULL)
{
m_SelectSence = new GameScene();
m_SelectSence->CreateSence("model/interface/selectchar/map",
"model/interface/selectchar/map/camera_end",
"model/interface/selectchar/map/envcreature",
"model/interface/selectchar/map/enveffect");
}
CRFile* prfile = rfOpen("data/CreateRolePos.ini");
if (prfile)
{
stringstream stream;
prfile->ReadToStream(stream);
rfClose(prfile);
stream >> s_RolePos[0] >> s_RolePos[1] >> s_RolePos[2] >> s_RolePos[3];
}
if(m_pPlayer == NULL)
m_pPlayer = new CPlayer;
m_pPlayer->SetGraphicsID(CREvent::GetSelectSex()+1);
LoadFaceHairIni();
m_pPlayer->SetDisplayModel();
m_pPlayer->SetDisplayModelGroup();
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:34,代码来源:CreateRoleEvent.cpp
示例2: GetWindow
void
CFileSystemDialogImp::OnPostLayoutLoad( void )
{GUCE_TRACE;
GUCEF::GUI::CFileSystemDialog::OnPostLayoutLoad();
// Try and link the icon imageset
CEGUI::ImagesetManager* imgSetManager = CEGUI::ImagesetManager::getSingletonPtr();
if ( imgSetManager->isImagesetPresent( "Icons" ) )
{
m_iconsImageSet = imgSetManager->getImageset( "Icons" );
}
// Hook up the event handlers
CEGUI::FrameWindow* window = static_cast< CEGUI::FrameWindow* >( GetWindow()->GetImplementationPtr() );
window->subscribeEvent( CEGUI::FrameWindow::EventCloseClicked ,
CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnCancelButtonClick ,
this ) );
CEGUI::MultiColumnList* fsViewWidget = static_cast< CEGUI::MultiColumnList* >( GetFileSystemGridView()->GetImplementationPtr() );
fsViewWidget->subscribeEvent( CEGUI::MultiColumnList::EventSelectionChanged ,
CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnItemSelected ,
this ) );
fsViewWidget->subscribeEvent( CEGUI::MultiColumnList::EventMouseDoubleClick ,
CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnItemDblClicked ,
this ) );
CEGUI::PushButton* okButton = static_cast< CEGUI::PushButton* >( GetOkButton()->GetImplementationPtr() );
okButton->subscribeEvent( CEGUI::PushButton::EventClicked ,
CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnOkButtonClick ,
this ) );
CEGUI::PushButton* cancelButton = static_cast< CEGUI::PushButton* >( GetCancelButton()->GetImplementationPtr() );
cancelButton->subscribeEvent( CEGUI::PushButton::EventClicked ,
CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnCancelButtonClick ,
this ) );
}
开发者ID:LiberatorUSA,项目名称:GUCE,代码行数:35,代码来源:guceCEGUIOgre_CFileSystemDialogImp.cpp
示例3: HandleLbSelected
/***********************************************************
handle event when list is selected
***********************************************************/
bool ChatBox::HandleLbSelected (const CEGUI::EventArgs& e)
{
const CEGUI::ListboxTextItem * it = static_cast<const CEGUI::ListboxTextItem *>(_lb->getFirstSelectedItem());
std::string txt = it->getText().c_str();
if(txt == "New..")
{
_myChannels->show();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/chooseChannel/edit"));
bed->activate();
_myChat->setEnabled(false);
}
else if(txt == "Whisper..")
{
_myChooseName->show();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/choosePlayerName/edit"));
bed->activate();
_myChat->setEnabled(false);
}
else
{
CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
bch->setProperty("Text", it->getText());
_currSelectedch= (int)_lb->getItemIndex(it);
}
_lb->hide();
return true;
}
开发者ID:leloulight,项目名称:lbanet,代码行数:37,代码来源:ChatBox.cpp
示例4: setClose
void GUIManager::setClose ( Screen *s )
{
CEGUI::PushButton *close = static_cast<CEGUI::PushButton *>(
CEGUI::WindowManager::getSingleton().getWindow("Sheet/Close"));
auto f = [=] (CEGUI::EventArgs const &) -> bool { s->close(); return true; };
close->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(f));
}
开发者ID:Nvveen,项目名称:Revolution,代码行数:8,代码来源:GUIManager.cpp
示例5: onSetCancel
void GameCoordinator::onSetCancel()
{
// Ready Button
CEGUI::PushButton* readyButton = static_cast<CEGUI::PushButton*>(CEGUI::System::getSingleton().getGUISheet()->getChildRecursive(
"Game/Control/Set/ReadyButton"));
if (readyButton)
readyButton->setEnabled(false);
}
开发者ID:lbarnabas88,项目名称:3DBattleships,代码行数:8,代码来源:GameCoordinator.cpp
示例6: initUI
void MainMenuScreen::initUI() {
// Init the UI
m_gui.init("GUI");
m_gui.loadScheme("TaharezLook.scheme");
m_gui.setFont("DejaVuSans-10");
CEGUI::PushButton* playGameButton = static_cast<CEGUI::PushButton*>(m_gui.createWidget("TaharezLook/Button", glm::vec4(0.45f, 0.5f, 0.1f, 0.05f), glm::vec4(0.0f), "NewGameButton"));
playGameButton->setText("New Game");
// Set up event to be called when we click
playGameButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainMenuScreen::onNewGameClicked, this));
CEGUI::PushButton* editorButton = static_cast<CEGUI::PushButton*>(m_gui.createWidget("TaharezLook/Button", glm::vec4(0.45f, 0.56f, 0.1f, 0.05f), glm::vec4(0.0f), "EditorButton"));
editorButton->setText("Level Editor");
// Set up event to be called when we click
editorButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainMenuScreen::onEditorClicked, this));
CEGUI::PushButton* exitButton = static_cast<CEGUI::PushButton*>(m_gui.createWidget("TaharezLook/Button", glm::vec4(0.45f, 0.62f, 0.1f, 0.05f), glm::vec4(0.0f), "ExitButton"));
exitButton->setText("Exit Game");
// Set the event to be called when we click
exitButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainMenuScreen::onExitClicked, this));
m_gui.setMouseCursor("TaharezLook/MouseArrow");
m_gui.showMouseCursor();
SDL_ShowCursor(0);
}
开发者ID:Barnold1953,项目名称:GraphicsTutorials,代码行数:25,代码来源:MainMenuScreen.cpp
示例7: onSetReady
void GameCoordinator::onSetReady()
{
cout << "asdf" << endl;
// Ready Button
CEGUI::PushButton* readyButton = static_cast<CEGUI::PushButton*>(CEGUI::System::getSingleton().getGUISheet()->getChildRecursive(
"Game/Control/Set/ReadyButton"));
cout << "asdf2" << endl;
if (readyButton)
readyButton->setEnabled(true);
cout << "asdf3" << endl;
}
开发者ID:lbarnabas88,项目名称:3DBattleships,代码行数:11,代码来源:GameCoordinator.cpp
示例8: initUI
void LevelOneScreen::initUI(){
_gui.init("GUI");
_gui.loadScheme("TaharezLook.scheme");
_gui.loadScheme("AlfiskoSkin.scheme");
_gui.setFont("DejaVuSans-10");
CEGUI::PushButton* exitButton = static_cast<CEGUI::PushButton*>(_gui.createWidget("AlfiskoSkin/Button", glm::vec4(0.0f, 0.0f, 0.06, 0.03f), glm::vec4(0.0f), "ExitButton"));
exitButton->setText("Exit Game");
exitButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&LevelOneScreen::onExitCliked, this));
_gui.setMouseCursor("TaharezLook/MouseArrow");
_gui.showMouseCursor();
SDL_ShowCursor(0);
}
开发者ID:Fuatnow,项目名称:RunAway,代码行数:14,代码来源:LevelOneScreen.cpp
示例9: buildGUI
void MenuState::buildGUI()
{
OgreFramework::getSingletonPtr()->m_pGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
CEGUI::MouseCursor::getSingleton().setImage("TaharezLook", "MouseArrow");
const OIS::MouseState state = OgreFramework::getSingletonPtr()->m_pMouse->getMouseState();
CEGUI::Point mousePos = CEGUI::MouseCursor::getSingleton().getPosition();
CEGUI::System::getSingleton().injectMouseMove(state.X.abs-mousePos.d_x,state.Y.abs-mousePos.d_y);
CEGUI::Window* pMainWnd = CEGUI::WindowManager::getSingleton().getWindow("AOF_GUI");
OgreFramework::getSingletonPtr()->m_pGUISystem->setGUISheet(pMainWnd);
CEGUI::PushButton* button = (CEGUI::PushButton*)pMainWnd->getChild("ExitButton");
button->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::onExitButton, this));
button = (CEGUI::PushButton*)pMainWnd->getChild("EnterButton");
button->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::onEnterButton, this));
}
开发者ID:flair2005,项目名称:RemoteRenderer,代码行数:16,代码来源:MenuState.cpp
示例10: AddChannel
/***********************************************************
add a channel to the chat
***********************************************************/
void ChatBox::AddChannel(const std::string & channel)
{
std::list<std::string>::iterator it = std::find(_channels.begin(), _channels.end(), channel);
if(it != _channels.end())
return;
_channels.push_back(channel);
AddTab(channel);
CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
bch->setProperty("Text", (const unsigned char *)channel.c_str());
std::string tosend("/join ");
tosend +=channel;
ThreadSafeWorkpile::getInstance()->AddChatText(tosend);
}
开发者ID:leloulight,项目名称:lbanet,代码行数:20,代码来源:ChatBox.cpp
示例11: AddWhisperChanel
/***********************************************************
add a whisper channel
***********************************************************/
void ChatBox::AddWhisperChanel(const std::string & name)
{
std::string wchtmp = "w:" + name;
if(std::find(_whisper_channels.begin(), _whisper_channels.end(), name) == _whisper_channels.end())
{
_whisper_channels.push_back(name);
if(_whisper_channels.size() > 3)
_whisper_channels.pop_front();
}
CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
bch->setProperty("Text", (const unsigned char *)wchtmp.c_str());
}
开发者ID:leloulight,项目名称:lbanet,代码行数:20,代码来源:ChatBox.cpp
示例12: initUI
void GameplayScreen::initUI() {
// Init the UI
m_gui.init("GUI");
m_gui.loadScheme("TaharezLook.scheme");
m_gui.setFont("DejaVuSans-10");
CEGUI::PushButton* testButton = static_cast<CEGUI::PushButton*>(m_gui.createWidget("TaharezLook/Button", glm::vec4(0.5f, 0.5f, 0.1f, 0.05f), glm::vec4(0.0f), "TestButton"));
testButton->setText("Exit Game!");
// Set the event to be called when we click
testButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GameplayScreen::onExitClicked, this));
CEGUI::Combobox* TestCombobox = static_cast<CEGUI::Combobox*>(m_gui.createWidget("TaharezLook/Combobox", glm::vec4(0.2f, 0.2f, 0.1f, 0.05f), glm::vec4(0.0f), "TestCombobox"));
m_gui.setMouseCursor("TaharezLook/MouseArrow");
m_gui.showMouseCursor();
SDL_ShowCursor(0);
}
开发者ID:Clever-Boy,项目名称:GraphicsTutorials,代码行数:17,代码来源:GameplayScreen.cpp
示例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));
}
开发者ID:kaoticscout,项目名称:Portfolio,代码行数:18,代码来源:GUIManager_NEW.cpp
示例14: HandleSend
/***********************************************************
handle send button event
***********************************************************/
bool ChatBox::HandleSend (const CEGUI::EventArgs& e)
{
CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
std::string curChannel = bch->getProperty("Text").c_str();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/edit"));
std::string currText = bed->getProperty("Text").c_str();
if(currText != "")
{
SendText(curChannel, currText);
bed->setProperty("Text", "");
}
return true;
}
开发者ID:leloulight,项目名称:lbanet,代码行数:22,代码来源:ChatBox.cpp
示例15: InitGameExit
CEGUI::Window* InitGameExit()
{
CEGUI::Window* wnd = LoadUI("GameExit");
wnd->setVisible(false);
CEGUI::PushButton* btn = WPushButton(wnd->getChild("GameExit/CharSel"));
btn->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(OnReturnCharSel));
btn = WPushButton(wnd->getChild("GameExit/ServerSel"));
btn->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(OnReturnServerSel));
btn = WPushButton(wnd->getChild("GameExit/Login"));
btn->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(OnReturnLogin));
btn = WPushButton(wnd->getChild("GameExit/Exit"));
btn->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(OnReturnExit));
return wnd;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:19,代码来源:GameExit.cpp
示例16: handleMineButtonClicked
/************************************************************************
Handle click on a mine button
************************************************************************/
bool MinesweeperSample::handleMineButtonClicked(const CEGUI::EventArgs& event)
{
const CEGUI::WindowEventArgs* evt = static_cast<const CEGUI::WindowEventArgs*>(&event);
CEGUI::PushButton* button = static_cast<CEGUI::PushButton*>(evt->window);
Location* buttonLoc = static_cast<Location*>(button->getUserData());
if (button->getID() > 0)
{
// dont touch flagged buttons
return true;
}
if (boardDiscover(*buttonLoc))
{
// We did not find a mine
button->setText(CEGUI::PropertyHelper<CEGUI::uint>::toString(d_board[buttonLoc->d_row][buttonLoc->d_col]));
if (isGameWin())
gameEnd(true);
}
else
{
for(size_t i = 0 ; i < MinesweeperSize ; ++i)
{
for (size_t j = 0 ; j < MinesweeperSize ; ++j)
{
if (! d_buttons[i][j]->isDisabled())
{
if (d_board[i][j] > 8)
{
d_buttons[i][j]->setText("B");
d_buttons[i][j]->setProperty("DisabledTextColour", "FFFF1010");
}
else
{
d_buttons[i][j]->setText(CEGUI::PropertyHelper<CEGUI::uint>::toString(d_board[i][j]));
}
}
d_buttons[i][j]->setEnabled(false);
}
}
gameEnd(false);
}
return true;
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:45,代码来源:Sample_Minesweeper.cpp
示例17: showHighScoreEntryDialog
void GameState::showHighScoreEntryDialog()
{
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
_highScoreEntryDialog = winMgr.loadWindowLayout( "highScoreEntry.layout" );
CEGUI::Window* text = static_cast<CEGUI::Window*>(winMgr.getWindow("StaticText"));
CEGUI::PushButton* btnOk = static_cast<CEGUI::PushButton*>(winMgr.getWindow("btnOk"));
CEGUI::PushButton* btnCancel = static_cast<CEGUI::PushButton*>(winMgr.getWindow("btnCancel"));
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(winMgr.getWindow("Editbox"));
text->setText(std::string("New HighScore!\n")+boost::lexical_cast<std::string,int>((int)_playerScore));
btnOk->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GameState::enterHighScore,this) );
btnCancel->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&GameState::skipHighScore,this) );
editbox->setText("Unknown");
editbox->setMaxTextLength(7);
editbox->setValidationString("^\\w*$");
CEGUI::System::getSingleton().setGUISheet( _highScoreEntryDialog );
}
开发者ID:jaschmid,项目名称:Lagom,代码行数:21,代码来源:GameState.cpp
示例18: enter
void MenuState::enter()
{
OgreFramework::getSingletonPtr()->m_pLog->logMessage("Entering MenuState...");
m_pSceneMgr = OgreFramework::getSingletonPtr()->m_pRoot->createSceneManager(ST_GENERIC, "MenuSceneMgr");
m_pSceneMgr->setAmbientLight(Ogre::ColourValue(0.7, 0.7, 0.7));
m_pCamera = m_pSceneMgr->createCamera("MenuCam");
m_pCamera->setPosition(Vector3(0, 25, -50));
m_pCamera->lookAt(Vector3(0, 0, 0));
m_pCamera->setNearClipDistance(1);
m_pCamera->setAspectRatio(Real(OgreFramework::getSingletonPtr()->m_pViewport->getActualWidth()) /
Real(OgreFramework::getSingletonPtr()->m_pViewport->getActualHeight()));
OgreFramework::getSingletonPtr()->m_pViewport->setCamera(m_pCamera);
OgreFramework::getSingletonPtr()->m_pKeyboard->setEventCallback(this);
OgreFramework::getSingletonPtr()->m_pMouse->setEventCallback(this);
OgreFramework::getSingletonPtr()->m_pGUIRenderer->setTargetSceneManager(m_pSceneMgr);
OgreFramework::getSingletonPtr()->m_pGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
CEGUI::MouseCursor::getSingleton().setImage("TaharezLook", "MouseArrow");
const OIS::MouseState state = OgreFramework::getSingletonPtr()->m_pMouse->getMouseState();
CEGUI::Point mousePos = CEGUI::MouseCursor::getSingleton().getPosition();
CEGUI::System::getSingleton().injectMouseMove(state.X.abs - mousePos.d_x, state.Y.abs - mousePos.d_y);
CEGUI::Window* pMainWnd = CEGUI::WindowManager::getSingleton().getWindow("AOF_GUI");
OgreFramework::getSingletonPtr()->m_pGUISystem->setGUISheet(pMainWnd);
CEGUI::PushButton* button = (CEGUI::PushButton*)pMainWnd->getChild("ExitButton");
button->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::onExitButton, this));
button = (CEGUI::PushButton*)pMainWnd->getChild("EnterButton");
button->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MenuState::onEnterButton, this));
m_bQuit = false;
createScene();
}
开发者ID:fish199902,项目名称:Flow,代码行数:40,代码来源:MenuState.cpp
示例19: initConnect
void t_chessGui::initConnect()
{
CEGUI::FrameWindow *connect = static_cast<CEGUI::FrameWindow *>(wmgr->loadWindowLayout("connect.layout"));
myRoot->addChildWindow(connect);
connect->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked,CEGUI::Event::Subscriber(boost::bind(closeConnect,connect,_1)));
CEGUI::MenuItem *connectItem = static_cast<CEGUI::MenuItem *>(wmgr->getWindow("Root/FrameWindow/Menubar/File/Open"));
connectItem->subscribeEvent(CEGUI::MenuItem::EventClicked,CEGUI::Event::Subscriber(boost::bind(openConnect,connect,_1)));
CEGUI::PushButton *newConnectItem = static_cast<CEGUI::PushButton *>(wmgr->getWindow("Lols2"));
newConnectItem->subscribeEvent(CEGUI::MenuItem::EventClicked,CEGUI::Event::Subscriber(boost::bind(openConnect,connect,_1)));
CEGUI::PushButton *cancelConnect = static_cast<CEGUI::PushButton *>(wmgr->getWindow("1Lols6"));
cancelConnect->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(boost::bind(closeConnect,connect,_1)));
CEGUI::Editbox *name = static_cast<CEGUI::Editbox *>(wmgr->getWindow("1Lols2"));
CEGUI::Editbox *ip = static_cast<CEGUI::Editbox *>(wmgr->getWindow("1Lols7"));
CEGUI::PushButton *startConnection = static_cast<CEGUI::PushButton *>(wmgr->getWindow("1Lols4"));
startConnection->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(boost::bind(connectToServer,name,ip,boost::ref(sharedData),_1)));
connect->hide();
}
开发者ID:Lalaland,项目名称:ChessV3,代码行数:28,代码来源:chessServer.cpp
示例20: buildGUI
void CharacterSelectState::buildGUI()
{
CEGUI::WindowManager &windMgr = CEGUI::WindowManager::getSingleton();
m_pMainWnd = windMgr.getWindow("CHAR_SEL_GUI");
m_pCharWnd = windMgr.getWindow("CharSelectWnd");
CEGUI::PushButton* createChar = (CEGUI::PushButton*)m_pCharWnd->getChild("CreateChar");
createChar->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&CharacterSelectState::onCharacterCreateButton, this));
CEGUI::PushButton* enterWorld = (CEGUI::PushButton*)m_pMainWnd->getChild("EnterWorld");
enterWorld->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&CharacterSelectState::onEnterWorldButton, this));
ParseDatabase();
stringstream ss;
for( pugi::xml_node node = root.child("character"); ; ) {
if (node) {
for (pugi::xml_attribute_iterator ait = node.attributes_begin(); ; ) {
ss << ait->value();
++ait;
if(ait != node.attributes_end())
ss << " ";
else
break;
}
node = node.next_sibling("character");
if (node)
ss << ";";
else
break;
} else {
ss << "EMPTY";
break;
}
}
CreateCharacterButtons(ss.str());
OgreFramework::getSingletonPtr()->m_pGUISystem->setGUISheet(m_pMainWnd);
}
开发者ID:flair2005,项目名称:RemoteRenderer,代码行数:39,代码来源:CharacterSelectState.cpp
注:本文中的cegui::PushButton类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论