⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddbouncingball_appui.cpp

📁 symbian平台下的一个游戏源代码
💻 CPP
字号:
// DDBouncingBall_AppUi.cpp
// ---------------------------
//
// Copyright (c) 2002 Symbian Ltd.  All rights reserved.
//

#include <avkon.hrh>
#include <eikmenup.h>

#include "DDBouncingBall_AppUi.h"
#include "DDBouncingBall_AppView.h"
#include "DDBouncingBall.hrh"
#include <DDBouncingBall.rsg>


// ConstructL is called by the application framework
void CDDBouncingBallAppUi::ConstructL()
    {
    BaseConstructL();

    //  Create the application view
    iAppView = CDDBouncingBallAppView::NewL(ClientRect());    

    AddToStackL(iAppView);
    }

CDDBouncingBallAppUi::CDDBouncingBallAppUi()
    {
    }

CDDBouncingBallAppUi::~CDDBouncingBallAppUi()
    {
    if (iAppView)
		{
		RemoveFromStack(iAppView);

		delete iAppView;
		iAppView = NULL;
		}
    }


// Handle any menu commands
void CDDBouncingBallAppUi::HandleCommandL(TInt aCommand)
    {
    switch(aCommand)
        {
        case EAknSoftkeyExit:
            Exit();
            break;
		case EDDBouncingBallStart:
			static_cast<CDDBouncingBallAppView*>(iAppView)->StartBouncingBallL();
			break;
		case EDDBouncingBallStop:
			static_cast<CDDBouncingBallAppView*>(iAppView)->StopBouncingBall();
			break;
        default:
            break;
        }
    }


void CDDBouncingBallAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
	{
	if (aResourceId == R_DDBOUNCINGBALL_MENUPANE)
		if (static_cast<CDDBouncingBallAppView*>(iAppView)->IsBouncing())
			{
			aMenuPane->SetItemDimmed(EDDBouncingBallStart, ETrue);
			aMenuPane->SetItemDimmed(EDDBouncingBallStop, EFalse);
			}
		else
			{
			aMenuPane->SetItemDimmed(EDDBouncingBallStart, EFalse);
			aMenuPane->SetItemDimmed(EDDBouncingBallStop, ETrue);
			}

	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -