79 lines
1.8 KiB
C++
79 lines
1.8 KiB
C++
// sonador #2.1.2.10 중화권 로그인/로고 화면 갱신
|
|
#pragma once
|
|
|
|
#include "SGameScene.h"
|
|
#include "KPrimitiveSprite.h"
|
|
|
|
// gpminsuk #2009-01-21
|
|
// K3DVector2 mSize 추가로 ImageScene의 크기 조절 가능하게 함.
|
|
// size는 기본 크기
|
|
// -1, -1이면 텍스쳐의 크기로 맞춘다.
|
|
|
|
namespace rp {
|
|
|
|
/// 이미지 씬
|
|
class SGameImageScene : public SGameScene
|
|
{
|
|
public:
|
|
|
|
/// 생성자
|
|
SGameImageScene(
|
|
SGameSceneManager& sceneMgr
|
|
, SGameScene* parent = 0
|
|
, const char* sceneName = ""
|
|
, const char* imageFile = ""
|
|
, const K3DVector& position = K3DVector( 0.f, 0.f, 0.1f )
|
|
, bool registerSelf = true
|
|
, KViewportObject* viewport = 0
|
|
, const K3DVector2& size = K3DVector2(-1.f, -1.f)
|
|
, const K3DVector2& scale = K3DVector2(1.f, 1.f));
|
|
|
|
/// 소멸자
|
|
virtual ~SGameImageScene();
|
|
|
|
/// 씬 등록 콜백
|
|
virtual void onEnter();
|
|
|
|
/// 씬 해제 콜백
|
|
virtual void onLeave();
|
|
|
|
/// 씬 활성화 콜백
|
|
virtual void onActivate();
|
|
|
|
/// 씬 비활성화 콜백
|
|
virtual void onDeactivate();
|
|
|
|
/// 씬 틱 콜백
|
|
virtual void onTick();
|
|
|
|
/// 씬 렌더 콜백
|
|
virtual void onRender( KViewportObject* viewport );
|
|
|
|
/// 씬 화면 획득
|
|
virtual K3DTexture* getRenderTarget() { return mTexture; }
|
|
|
|
/// 씬 화면 폭 획득
|
|
virtual int getWidth() const;
|
|
|
|
/// 씬 화면 높이 획득
|
|
virtual int getHeight() const;
|
|
|
|
/// 씬 화면이 준비되었는지 여부 확인
|
|
virtual bool isImageReady() const;
|
|
|
|
virtual void SetAdditiveRenderMode(bool useAdditive);
|
|
|
|
private:
|
|
|
|
std::string mImageFile;
|
|
KSpritePrimitive mPrimitive;
|
|
KResSpriteSPtr mSprite;
|
|
K3DTextureSPtr mTexture;
|
|
K3DVector mPosition;
|
|
K3DVector2 mSize;
|
|
K3DVector2 mScale;
|
|
bool mRegisterSelf;
|
|
KViewportObject* mViewport;
|
|
};
|
|
|
|
} |