example3dappui.cpp
来自「手机开发3D应用平台,开发平台是诺基亚的carbird,这是一个很有用的东西,希」· C++ 代码 · 共 85 行
CPP
85 行
// INCLUDE FILES
#include "Example3DAppUi.h"
#include "Example3DContainer.h"
#include <Example3D.rsg>
#include <avkon.rsg>
#include "CEngine.h"
#include <eikmenup.h>
#include "Example3D.hrh"
#include <avkon.hrh>
void CExample3DAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CExample3DContainer;
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
// Start in fullscreen because of problem issue in 3.0 openGL
iFullScreen = 1;
iSoundSystem = KeySounds();
// disable key tones
iSoundSystem->PushContextL( R_AVKON_SILENT_SKEY_LIST );
// 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 );
}
CExample3DAppUi::~CExample3DAppUi()
{
iSoundSystem->PopContext();
if( iAppContainer )
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
void CExample3DAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
{
Exit();
break;
}
case EExample3DFullScreen:
{
iFullScreen ^= 1;
// drop trough to default
}
default:
{
iAppContainer->Command( aCommand );
break;
}
}
}
void CExample3DAppUi::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
{
if( aResourceId == R_EXAMPLE3D_MENU )
{
if( iFullScreen )
{
aMenuPane->SetItemTextL( EExample3DFullScreen, _L("Exit fullscreen") );
}
else
{
aMenuPane->SetItemTextL( EExample3DFullScreen, _L("Fullscreen") );
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?