当前位置: 首页>>代码示例>>C++>>正文


C++ MessageDialog::show方法代码示例

本文整理汇总了C++中MessageDialog::show方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageDialog::show方法的具体用法?C++ MessageDialog::show怎么用?C++ MessageDialog::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessageDialog的用法示例。


在下文中一共展示了MessageDialog::show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: handleKeypress

void Game::handleKeypress(const Common::Event &event) {
	if (event.kbd.flags & Common::KBD_CTRL) {
		if (_widepipeCtr == 8) {
			// Implement original game cheating keys here someday
		} else {
			if (event.kbd.keycode == (Common::KEYCODE_a +
					(DEBUG_STRING[_widepipeCtr] - 'a'))) {
				if (++_widepipeCtr == 8) {
					MessageDialog *dlg = new MessageDialog(_vm, 2,
						"CHEATING ENABLED", "(for your convenience).");
					dlg->show();
					delete dlg;
				}
			}
		}
	}

	switch (event.kbd.keycode) {
	case Common::KEYCODE_F1:
		_vm->_dialogs->_pendingDialog = DIALOG_GAME_MENU;
		break;
	case Common::KEYCODE_F5:
		_vm->_dialogs->_pendingDialog = DIALOG_SAVE;
		break;
	case Common::KEYCODE_F7:
		_vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
		break;
	default:
		break;
	}
}
开发者ID:clone2727,项目名称:scummvm,代码行数:31,代码来源:game.cpp

示例2: userDoubleClicked

void MainWindow::userDoubleClicked(const QString &nick)
{
    if (!usersChatting.contains(nick))
    {
        MessageDialog *msgdlg = new MessageDialog(nick, 0);
        connect(msgdlg, SIGNAL(messageReady(QString,QString)), irc, SLOT(sendMessage(QString,QString)));

        QFont chatfont;
        if (chatfont.fromString(settings.chatfont))
            msgdlg->setFont(chatfont);

        msgdlg->show();
        usersChatting.insert(nick, msgdlg);
    }

    MessageDialog *msgdlg = usersChatting.value(nick);
    if (msgdlg)
        msgdlg->show();
}
开发者ID:reddrop,项目名称:datawolf3-moarstuffandgoats,代码行数:19,代码来源:mainwindow.cpp

示例3: handleKeypress

void Game::handleKeypress(const Common::KeyState &kbd) {
	if (kbd.flags & Common::KBD_CTRL) {
		if (_widepipeCtr == 8) {
			// Implement original game cheating keys here someday
		} else {
			if (kbd.keycode == (Common::KEYCODE_a +
					(DEBUG_STRING[_widepipeCtr] - 'a'))) {
				if (++_widepipeCtr == 8) {
					MessageDialog *dlg = new MessageDialog(_vm, 2,
						"CHEATING ENABLED", "(for your convenience).");
					dlg->show();
					delete dlg;
				}
			}
		}
	}

	Scene &scene = _vm->_game->_scene;
	switch (kbd.keycode) {
	case Common::KEYCODE_F1:
		_vm->_dialogs->_pendingDialog = DIALOG_GAME_MENU;
		break;
	case Common::KEYCODE_F5:
		_vm->_dialogs->_pendingDialog = DIALOG_SAVE;
		break;
	case Common::KEYCODE_F7:
		_vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
		break;
	case Common::KEYCODE_PAGEUP:
		scene._userInterface._scrollbarStrokeType = SCROLLBAR_UP;
		scene._userInterface.changeScrollBar();
		break;
	case Common::KEYCODE_PAGEDOWN:
		scene._userInterface._scrollbarStrokeType = SCROLLBAR_DOWN;
		scene._userInterface.changeScrollBar();
		break;


	default:
		break;
	}
}
开发者ID:heather162,项目名称:scummvm,代码行数:42,代码来源:game.cpp


注:本文中的MessageDialog::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。