本文整理汇总了C++中cegui::Window::setAlwaysOnTop方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::setAlwaysOnTop方法的具体用法?C++ Window::setAlwaysOnTop怎么用?C++ Window::setAlwaysOnTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::setAlwaysOnTop方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenSaleUI
bool OpenSaleUI()
{
CEGUI::WindowManager& wndmgr = GetWndMgr();
//获取出售订单ID
CEGUI::MultiColumnList* mcl = WMCL(wndmgr.getWindow("Auction/Tab/BuySale/BuyMCL"));
if(!mcl)
return false;
CEGUI::ListboxItem* lbi = mcl->getFirstSelectedItem();
if(!lbi)
{
//MessageBox(g_hWnd,AppFrame::GetText("AU_100"),"ERROR",MB_OK);
GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_100"),NULL,NULL,true);
return false;
}
CEGUI::Window* wnd = wndmgr.getWindow("Auction/SaleWnd");
wnd->setVisible(true);
wnd->setAlwaysOnTop(true);
CEGUI::Editbox* editbox = WEditBox(wnd->getChildRecursive("Auction/SaleWnd/saleNum"));//出售界面编辑框激活
editbox->activate();
AHdata& ah = GetInst(AHdata);
uint ID = lbi->getID();
ah.SetCanSaleID(ID);
return true;
}
示例2: Close
bool GoodsViewerPage::Close()
{
CEGUI::Window *pPage = GetPageWindow();
if(pPage)
{
pPage->setVisible(false);
pPage->setAlwaysOnTop(false);
}
else
return false;
return true;
}
示例3: Open
bool RankPage::Open()
{
CEGUI::Window* wnd = GetPageWindow();
if(wnd)
{
wnd->setVisible(true);
wnd->setAlwaysOnTop(true);
}
else
{
throw CEGUI::InvalidRequestException("RankPage Open failed!");
return false;
}
return true;
}
示例4: Close
bool RankPage::Close()
{
CEGUI::Window* pPage = GetPageWindow();
if(!pPage)
{
throw CEGUI::InvalidRequestException("RankPage Close failed!");
return false;
}
else
{
pPage->setVisible(false);
pPage->setAlwaysOnTop(false);
}
return true;
}
示例5: Open
bool GoodsViewerPage::Open()
{
CEGUI::Window *pPage = GetPageWindow();
if (pPage)
{
pPage->setVisible(true);
pPage->activate();
pPage->setAlwaysOnTop(true);
}
else
{
CEGUI::InvalidRequestException("GoodsViewerPage Open Failed!");
return false;
}
return true;
}
示例6: OpenBuyUI
bool OpenBuyUI()
{
CEGUI::WindowManager& wndmgr = GetWndMgr();
CEGUI::MultiColumnList* mcl = WMCL(wndmgr.getWindow("Auction/Tab/BuySale/SaleMCL"));
if(!mcl)
return false;
CEGUI::ListboxItem* lbi = mcl->getFirstSelectedItem();
if(!lbi)
{
GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_102"),NULL,NULL,true);
return false;
}
CEGUI::Window* wnd = wndmgr.getWindow("Auction/BuyWnd");
wnd->setVisible(true);
wnd->setAlwaysOnTop(true);
CEGUI::Editbox* editbox = WEditBox(wnd->getChildRecursive("Auction/Buy/buyNum"));//购买界面编辑框激活
editbox->activate();
AHdata& ah = GetInst(AHdata);
//界面获取购买订单ID
uint ID = lbi->getID();
ah.SetCanBuyID(ID);//保存要购买的订单ID
return true;
}
示例7: Initialize
void MenusScene::Initialize()
{
InitializeResources(resourceGroupName);
player1Nav = MenuNavigator(this);
player1Nav.AllowMenuControls = true;
player2Nav = MenuNavigator(this);
Player1Data.MainElement = ElementEnum::Earth;
Player2Data.MainElement = ElementEnum::Earth;
InputNotifier::GetInstance()->AddObserver(&player1Nav);
InputNotifier::GetInstance()->AddObserver(&player2Nav);
guiManager->AddScheme("MainMenu.scheme");
guiManager->LoadLayout("MainMenuLayout.layout", nullptr);
guiManager->LoadLayout("GameSetupMenu.layout", nullptr);
guiManager->LoadLayout("TutorialLayout.layout", nullptr);
//guiManager->LoadLayout("CharacterSetupMenu.layout", nullptr);
if(progressBar.GetWindow() == NULL)
{
CEGUI::Window* progressWindow = CEGUI::WindowManager::getSingleton().createWindow("Generic/Image", "CursorProgress");
progressWindow->setSize( CEGUI::USize(CEGUI::UDim( 0.1f, 0 ), CEGUI::UDim( 0.1f, 0 ) ) );
progressWindow->setPosition( CEGUI::UVector2(CEGUI::UDim( 0.5f, 0 ), CEGUI::UDim( 0.5f, 0 ) ) );
progressWindow->setAlwaysOnTop(true);
progressWindow->setMousePassThroughEnabled(true);
guiManager->GetRootWindow()->addChild(progressWindow);
progressBar.SetWindow(progressWindow);
progressWindow->setVisible(true);
}
handlers[Screens::MainMenu] = new MainMenuHandler(this);
//handlers[Screens::CharacterSetup] = new CharacterMenuHandler(this);
handlers[Screens::GameSetup] = new GameSetupMenuHandler(this);
handlers[Screens::Tutorial] = new TutorialMenuHandler(this);
for (unsigned int i = 0; i < Screens::Count; i++)
{
handlers[i]->Hide();
}
//currentScreen = GameSetup;
handlers[currentScreen]->Show();
InputManager* inputManager = InputManager::GetInstance();
KinectSpeechReader* speechReader = inputManager->GetSpeechReader();
if(speechReader)
{
inputManager->RegisterAudioListener(&player1Nav);
//Load the grammar for this scene
if(!speechReader->LoadGrammarFile("MenusSpeech.grxml"))
printf("Grammer Load Fail\n");
//Set the confidence threshold
speechReader->SetConfidenceThreshold(0.6f);
}
ogreSceneManager->setAmbientLight(Ogre::ColourValue(1.0f, 1.0f, 1.0f, 1.0f));
CreateCameraAndViewport(Ogre::ColourValue(0.0f, 0.0f, 0.0f, 0.0f));
}
示例8: initialise
//.........这里部分代码省略.........
guiContext->setRootWindow(background);
d_alarm = (Timer*)winMgr.createWindow("Timer");
background->addChild(d_alarm);
d_alarm->setDelay(0.5); // Tick each 0.5 seconds
// create the game frame
Window* frame = winMgr.createWindow("Vanilla/FrameWindow");
d_alarm->addChild(frame);
frame->setXPosition(UDim(0.3f, 0.0f));
frame->setYPosition(UDim(0.15f, 0.0f));
frame->setWidth(UDim(0.4f, 0.0f));
frame->setHeight(UDim(0.7f, 0.0f));
frame->setText("CEGUI Minesweeper");
// create the action panel
Window* action = winMgr.createWindow("DefaultWindow");
frame->addChild(action);
action->setXPosition(UDim(0.03f, 0.0f));
action->setYPosition(UDim(0.10f, 0.0f));
action->setWidth(UDim(0.94f, 0.0f));
action->setHeight(UDim(0.1f, 0.0f));
d_counter = (Editbox*)winMgr.createWindow("Vanilla/Editbox", "mine_counter");
action->addChild(d_counter);
d_counter->setText("0");
d_counter->setTooltipText("Number of mine");
d_counter->setReadOnly(true);
d_counter->setXPosition(UDim(0.0f, 0.0f));
d_counter->setYPosition(UDim(0.0f, 0.0f));
d_counter->setWidth(UDim(0.3f, 0.0f));
d_counter->setHeight(UDim(1.0f, 0.0f));
Window* newGame = winMgr.createWindow("Vanilla/Button", "new_game");
action->addChild(newGame);
newGame->setText("Start");
newGame->setTooltipText("Start a new game");
newGame->setXPosition(UDim(0.35f, 0.0f));
newGame->setYPosition(UDim(0.0f, 0.0f));
newGame->setWidth(UDim(0.3f, 0.0f));
newGame->setHeight(UDim(1.0f, 0.0f));
newGame->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&MinesweeperSample::handleGameStartClicked, this));
d_timer = (Editbox*)winMgr.createWindow("Vanilla/Editbox", "timer");
action->addChild(d_timer);
d_timer->setText("0");
d_timer->setTooltipText("Time elapsed");
d_timer->setReadOnly(true);
d_timer->setXPosition(UDim(0.7f, 0.0f));
d_timer->setYPosition(UDim(0.0f, 0.0f));
d_timer->setWidth(UDim(0.3f, 0.0f));
d_timer->setHeight(UDim(1.0f, 0.0f));
d_alarm->subscribeEvent(Timer::EventTimerAlarm, Event::Subscriber(&MinesweeperSample::handleUpdateTimer, this));
// Board button grid
Window* grid = winMgr.createWindow("DefaultWindow");
frame->addChild(grid);
grid->setXPosition(UDim(0.03f, 0.0f));
grid->setYPosition(UDim(0.23f, 0.0f));
grid->setWidth( UDim(0.94f, 0.0f));
grid->setHeight( UDim(0.74f, 0.0f));
const float d_inc = 1.0f / MinesweeperSize;
for(size_t i = 0 ; i < MinesweeperSize ; ++i)
{
// create a container for each row
Window* row = winMgr.createWindow("DefaultWindow");
row->setArea(URect(UDim(0,0), UDim(d_inc * i, 0),
UDim(1,0), UDim(d_inc * (i + 1), 0)));
grid->addChild(row);
for(size_t j = 0 ; j < MinesweeperSize ; ++j)
{
// Initialize buttons coordinate
d_buttonsMapping[i][j].d_col = j;
d_buttonsMapping[i][j].d_row = i;
d_buttons[i][j] = (PushButton*)winMgr.createWindow("Vanilla/Button");
row->addChild(d_buttons[i][j]);
d_buttons[i][j]->setArea(URect(UDim(d_inc * j, 0), UDim(0,0),
UDim(d_inc * (j + 1), 0), UDim(1,0)));
d_buttons[i][j]->setEnabled(false);
// Associate user data
d_buttons[i][j]->setUserData(&(d_buttonsMapping[i][j]));
d_buttons[i][j]->setID(0);
// Connect event handlers
d_buttons[i][j]->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&MinesweeperSample::handleMineButtonClicked, this));
d_buttons[i][j]->subscribeEvent(Window::EventMouseButtonDown, Event::Subscriber(&MinesweeperSample::handleMineButtonDown, this));
}
}
d_result = winMgr.createWindow("Vanilla/StaticText");
grid->addChild(d_result);
d_result->setXPosition(UDim(0.0, 0.0));
d_result->setYPosition(UDim(0.0, 0.0));
d_result->setWidth(UDim(1.0, 0.0));
d_result->setHeight(UDim(1.0, 0.0));
d_result->setAlwaysOnTop(true);
d_result->setProperty("HorzFormatting", "HorzCentred");
d_result->setVisible(false);
d_result->setAlpha(0.67f);
// activate the background window
background->activate();
// success!
return true;
}