📄 mario2dappui.cpp
字号:
/*
============================================================================
* Name : CMario2DAppUi.cpp
* Part of : 2DMario
* Description : Implementation of CMario2DAppUi
* Copyright (c) 2007 Nokia Corporation
============================================================================
*/
#define KLayoutAware 0x08 // ELayoutAwareAppFlag is not defined in pre-FP3 SDK's
// INCLUDE FILES
#include "Mario2DAppui.h"
#include "Mario2DContainer.h"
#include <aknenv.h>
#include <avkon.hrh>
#include <avkon.rsg>
void CMario2DAppUi::ConstructL()
{
BaseConstructL( ENoAppResourceFile | KLayoutAware );
// On S60, set key block mode to allow multiple simultaneous keypresses
SetKeyBlockMode( ENoKeyBlock );
iAppContainer = new (ELeave) CMario2DContainer;
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
iEikonEnv->RootWin().EnableScreenChangeEvents();
iSoundSystem = KeySounds();
iSoundSystem->PushContextL( R_AVKON_SILENT_SKEY_LIST );
}
CMario2DAppUi::~CMario2DAppUi()
{
iSoundSystem->PopContext();
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
void CMario2DAppUi::HandleCommandL( TInt aCommand )
{
switch ( aCommand )
{
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}
void CMario2DAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aControl)
{
CAknAppUi::HandleWsEventL(aEvent, aControl);
if ( aEvent.Type() == EEventScreenDeviceChanged )
{
iAppContainer->HandleScreenDeviceChanged();
}
}
// End of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -