example3dappui.cpp

来自「This package includes a 3-D game engine 」· C++ 代码 · 共 68 行

CPP
68
字号
    /*
    *
============================================================================
    *  Name     : CExample3DAppUi.cpp
    *  Part of  : Example3D
    *  Created  : 12/14/2003 by Forum Nokia
    *  Description:
    *     This is the project specification file for Example3D.
    *     Initial content was generated by Series 60 AppWizard.
    *
    *  Version  : 1.0.0
    *  Copyright: Forum Nokia
    *
============================================================================
    */

// INCLUDES
#include "Example3DAppUi.h"
#include "Example3DContainer.h" 
#include <Example3D.rsg>
#include "example3d.hrh"
#include <avkon.hrh>

// MEMBER FUNCTIONS

void CExample3DAppUi::ConstructL()
    {
    BaseConstructL();
    iAppContainer = new (ELeave) CExample3DContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL( ClientRect() );

	// series60 blocks simultaneous key presses by default
	// this game uses throttle and steering keys at the same time
	// and this line makes it possible
 	SetKeyBlockMode( ENoKeyBlock );

	AddToStackL( iAppContainer );
    }


CExample3DAppUi::~CExample3DAppUi()
    {
    if (iAppContainer)
        {
        RemoveFromStack( iAppContainer );
        delete iAppContainer;
        }
   }


void CExample3DAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
        {
        case EAknSoftkeyBack:
        case EEikCmdExit:
            {
            Exit();
            break;
            }
        // TODO: Add Your command handling code here

        default:
            break;      
        }
    }

⌨️ 快捷键说明

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