mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
a bit of hero window
help needed - make something to prevent changing surface stored in CHeroWindow::background. I do not overwrite it, but it changes dramatically with every call of CHeroWindow method! And besides - is there anything to make my window displayed easily, without calling show() every frame when it should be displayed? any machanism?
This commit is contained in:
16
CHeroWindow.h
Normal file
16
CHeroWindow.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "CPlayerInterface.h"
|
||||
|
||||
class SDL_Surface;
|
||||
class CGHeroInstance;
|
||||
|
||||
class CHeroWindow: public IShowable, public virtual CIntObject
|
||||
{
|
||||
SDL_Surface * background;
|
||||
const CGHeroInstance * curHero;
|
||||
public:
|
||||
CHeroWindow(); //c-tor
|
||||
~CHeroWindow(); //d-tor
|
||||
void setHero(const CGHeroInstance * hero); //sets main displayed hero
|
||||
virtual void show(SDL_Surface * to = NULL); //shows hero window
|
||||
};
|
||||
Reference in New Issue
Block a user