本文整理汇总了C++中MainMenu::Show方法的典型用法代码示例。如果您正苦于以下问题:C++ MainMenu::Show方法的具体用法?C++ MainMenu::Show怎么用?C++ MainMenu::Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainMenu
的用法示例。
在下文中一共展示了MainMenu::Show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowMenu
void Game::ShowMenu() {
MainMenu mainMenu;
MainMenu::MenuResult result=mainMenu.Show(_mainWindow);
if(result == MainMenu::Exit) {
_gameState = Game::Exiting;
}
if(result == MainMenu::newGame) {
_gameState = Game::newGame;
}
if(result == MainMenu::joinGame) {
_gameState = Game::joinGame;
}
}
示例2: ShowMenu
void Game::ShowMenu()
{
MainMenu mainMenu;
MainMenu::MenuResult result = mainMenu.Show(_mainWindow);
switch(result)
{
case MainMenu::Exit:
_gameState = Game::Exiting;
break;
case MainMenu::Play1:
_gameState = Game::Playing;
break;
}
}
示例3: ShowMenu
void Game::ShowMenu()
{
MainMenu mainMenu;
MainMenu::MenuResult result = mainMenu.Show(_mainWindow);
switch(result)
{
case MainMenu::Exit:
_gameState = Game::Exiting;
break;
case MainMenu::Play:
InstructionScreen instructionScreen;
instructionScreen.Show(_mainWindow);
ResetGame();
_gameState = Game::Playing;
break;
case MainMenu::Music:
_gameState = Game::ShowingMenu;
if(ServiceLocator::GetAudio()->IsSongPlaying())
{
ServiceLocator::GetAudio()->StopAllSounds();
}
break;
}
}
示例4: ufusr
//------------------------------- DIALOG LAUNCHING ---------------------------------
//
// Before invoking this application one needs to open any part/empty part in NX
// because of the behavior of the blocks.
//
// Make sure the dlx file is in one of the following locations:
// 1.) From where NX session is launched
// 2.) $UGII_USER_DIR/application
// 3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly
// recommended. This variable is set to a full directory path to a file
// containing a list of root directories for all custom applications.
// e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_ROOT_DIR\menus\custom_dirs.dat
//
// You can create the dialog using one of the following way:
//
// 1. USER EXIT
//
// 1) Create the Shared Library -- Refer "Block UI Styler programmer's guide"
// 2) Invoke the Shared Library through File->Execute->NX Open menu.
//
//------------------------------------------------------------------------------
extern "C" DllExport void ufusr(char *param, int *retcod, int param_len)
{
NXCoCADTest *theNXCoCADTest = NULL;
taskNum = 1;
char buffer[255];
int temp;
int i = 0;
DWORD test = 0; ///< 0 represents the first thread
HANDLE handle;
DWORD numThreadId = 0;
myUI = UI::GetUI();
message = myUI->NXMessageBox();
try
{
//theNXCoCADTest = new NXCoCADTest();
//handle = CreateThread(NULL, 0, ThreadProc, (LPVOID)&test, 0, &numThreadId);
// The following method shows the dialog immediately
//theNXCoCADTest->Show();
//if(bTimerEnable)
//{
//KillTimer(NULL, nTimerID);
//}
g_timer_id = SetTimer(NULL, 0 ,2000, timer_cb);
if(!Initialize())
{
NXCoCADTest::theUI->NXMessageBox()->Show("Iniliazation Failed", NXOpen::NXMessageBox::DialogTypeError, "Iniliazation Failed");
return;
}
MainMenu *theMainMenu = NULL;
theMainMenu = new MainMenu();
theMainMenu->Show();
}
catch(exception& ex)
{
//---- Enter your exception handling code here -----
NXCoCADTest::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what());
}
if (handle)
{
message->Show("提示",NXMessageBox::DialogTypeQuestion,"delete subThread");
CloseHandle(handle);
}
if(theNXCoCADTest != NULL)
{
delete theNXCoCADTest;
theNXCoCADTest = NULL;
//if(bTimerEnable)
//{
// KillTimer(NULL, nTimerID);
//}
Terminate();
//Terminate();
}
KillTimer(NULL,g_timer_id);
}