gameappview.h

来自「一个symbian 冒险游戏代码」· C头文件 代码 · 共 59 行

H
59
字号
////////////////////////////////////////////////////////////////////////
//
// GameAppView.h
//
// Copyright (c) 2006 Nokia Corporation. All rights reserved.
//
////////////////////////////////////////////////////////////////////////

#ifndef __GameAPPVIEW_H__
#define __GameAPPVIEW_H__

////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////

#include <coecntrl.h>
#include "App.h"

////////////////////////////////////////////////////////////////////////

// Forward Declarations
class CGameEngine;

////////////////////////////////////////////////////////////////////////

class CGameAppView : public CCoeControl
    {
public:

    static CGameAppView* NewL(const TRect& aRect);
    static CGameAppView* NewLC(const TRect& aRect);
    ~CGameAppView();

public:  
	
	// from CCoeControl
    void Draw(const TRect& aRect) const;
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

public:
	void StartGameL();
	TBool IsPlaying();
	void StopGame();
  
private:
    void ConstructL(const TRect& aRect);
    CGameAppView();

private:
	CGameEngine* iEngine;
	TBool iGameStarted;

	App::KeyType getKeyByScancode( int scancode );
    };

////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////

#endif // __GameAPPVIEW_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?