📄 example3dappui.cpp
字号:
/*
============================================================================
* Name : Example3DAppUi.cpp
* Part of : Example3D
* Description : Definition of Example3DAppUi
* Copyright (c) 2005 Nokia Corporation
============================================================================
*/
/// INCLUDE FILES
#include "Example3DAppUi.h"
#include "Example3DContainer.h"
#include <Example3D.rsg>
#include "CEngine.h"
#include <eikmenup.h>
#include "Example3D.hrh"
#ifdef __S80__
#include <eikon.hrh>
#endif
#ifdef __S60__
#include <avkon.rsg>
#include <avkon.hrh>
#endif
void CExample3DAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CExample3DContainer;
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
#ifdef GLES
// 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 );
#endif
#ifdef __S60__
// 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 );
#endif
}
CExample3DAppUi::~CExample3DAppUi()
{
#ifdef GLES
iSoundSystem->PopContext();
#endif
if( iAppContainer )
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
void CExample3DAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
#ifdef __S60__
case EAknSoftkeyExit:
#endif
{
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 + -