📄 example3dappui.cpp
字号:
/*
============================================================================
* Name : Example3DAppUi.cpp
* Part of : Example3D
* Description : Definition of Example3DAppUi
* Copyright (c) 2007 Nokia Corporation
============================================================================
*/
/// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -