void DesktopDock::updateMenu(bool b) { if (b) createMenu(); else destroyMenu(); }
// entry point of the program int main( int arc, char* argv[] ) { // First we need to create our Game Framework Initialise(SCREEN_X, SCREEN_Y, false,"Shoot em up" ); initGame(); initMenu(); initBoss(); initGameOver(); gameProcess = &menuState; do { frameCounter++; if(frameCounter > 5000) frameCounter = 0; gameProcess(); // function pointer to run game } while ( FrameworkUpdate() == false ); // clean up memory destroyGame(); destroyMenu(); destroyBoss(); destroyGameOver(); Shutdown(); return 0; }
void onComponentComplete(WGContextMenu* contextMenu) { auto context = QQmlEngine::contextForObject(contextMenu); assert(context != nullptr); auto componentContextProperty = context->contextProperty("componentContext"); assert(componentContextProperty.isValid()); auto componentContextVariant = QtHelpers::toVariant(componentContextProperty); assert(!componentContextVariant.isVoid()); auto componentContext = componentContextVariant.value<IComponentContext*>(); assert(componentContext != nullptr); pContext_ = componentContext; auto viewProperty = context->contextProperty("View"); if (viewProperty.isValid()) { view_ = qvariant_cast<QQuickWidget*>(viewProperty); } auto windowIdProperty = context->contextProperty("windowId"); if (windowIdProperty.isValid()) { windowId_ = windowIdProperty.toString().toUtf8().data(); } destroyMenu(); createMenu(); prepareMenu(); }
void setPath(const QString& path) { path_ = path.toUtf8().data(); emit self_.pathChanged(); destroyMenu(); createMenu(); prepareMenu(); }
/*---------------------------------------------------------------------*//** 破棄 **//*---------------------------------------------------------------------*/ void FocusMenu::destroy() { _isEnableSelf = false; // メニュー破棄 destroyMenu(); // メニュー表示パラメータの削除 delete _showprm; _showprm = 0L; }
DesktopDock::~DesktopDock() { kdebugf(); destroyMenu(); delete MoveMenuAction; MoveMenuAction = 0; delete DockWindow; DockWindow = 0; kdebugf2(); }
void QG_GraphicView::setMenu(const QString& activator, QMenu* menu) { destroyMenu(activator); menus[activator] = menu; }
~Implementation() { destroyMenu(); }
void mainMenuExit( event_t ev ) { destroyMenu(mainMenu); mainMenu = NULL; }
/*---------------------------------------------------------------------*//** ゲーム開始通知 **//*---------------------------------------------------------------------*/ void FocusMenu::notifyEnterGame() { // メニュー再作成 destroyMenu(); createMenu(); }