📄 lvtetrisappui.cpp
字号:
/*
============================================================================
Name : LvTetrisAppUi.cpp
Author : lvky@cn.fujitsu.com
Copyright : Lvky All copyright
Description : CLvTetrisAppUi implementation
============================================================================
*/
// INCLUDE FILES
#include <eikbtgpc.h>//for cba()
#include "LvTetrisApp.h"
#include "LvTetrisAppui.h"
#include "GamestartContainer.h"
#include "LvTetris.hrh"
#include <LvTetris.rsg>
#include <avkon.hrh>
#include "LvtetrisMenu.h"
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CLvTetrisAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CLvTetrisAppUi::ConstructL()
{
BaseConstructL();
StatusPane()->MakeVisible(EFalse);
Cba()->MakeVisible(EFalse);
iContainer = CGamestartContainer::NewL( ApplicationRect() );
}
// ----------------------------------------------------
// CLvTetrisAppUi::~CLvTetrisAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CLvTetrisAppUi::~CLvTetrisAppUi()
{
if (iContainer)
{
delete iContainer;
iContainer = NULL;
}
}
#if 1
// ----------------------------------------------------
// CLvTetrisAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CLvTetrisAppUi::HandleKeyEventL(
const TKeyEvent& aKeyEvent,TEventCode aType)
{
TKeyResponse reponse = EKeyWasNotConsumed;
if (iContainer->GameState() == GAMEQUITING)
{
Exit();
}
reponse = iContainer->OfferKeyEventL(aKeyEvent,aType);
return reponse;
}
#endif
// ----------------------------------------------------
// CLvTetrisAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CLvTetrisAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
default:
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -