mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Hide the mouse cursor while displaying a popup window.
This commit is contained in:
@@ -715,6 +715,8 @@ void CRClickPopup::close()
|
||||
CInfoPopup::CInfoPopup(SDL_Surface * Bitmap, int x, int y, bool Free)
|
||||
:free(Free),bitmap(Bitmap)
|
||||
{
|
||||
CGI->curh->hide();
|
||||
|
||||
pos.x = x;
|
||||
pos.y = y;
|
||||
pos.h = bitmap->h;
|
||||
@@ -729,6 +731,8 @@ CInfoPopup::CInfoPopup(SDL_Surface * Bitmap, int x, int y, bool Free)
|
||||
|
||||
CInfoPopup::CInfoPopup(SDL_Surface *Bitmap, bool Free)
|
||||
{
|
||||
CGI->curh->hide();
|
||||
|
||||
free=Free;
|
||||
bitmap=Bitmap;
|
||||
|
||||
@@ -751,6 +755,10 @@ void CInfoPopup::show(SDL_Surface * to)
|
||||
{
|
||||
blitAt(bitmap,pos.x,pos.y,to);
|
||||
}
|
||||
CInfoPopup::~CInfoPopup()
|
||||
{
|
||||
CGI->curh->show();
|
||||
}
|
||||
|
||||
void SComponent::init(Etype Type, int Subtype, int Val)
|
||||
{
|
||||
|
@@ -118,7 +118,7 @@ public:
|
||||
void show(SDL_Surface * to);
|
||||
CInfoPopup(SDL_Surface * Bitmap, int x, int y, bool Free=false); //c-tor
|
||||
CInfoPopup(SDL_Surface *Bitmap = NULL, bool Free = false); //default c-tor
|
||||
~CInfoPopup(){}; //d-tor
|
||||
~CInfoPopup(); //d-tor
|
||||
};
|
||||
|
||||
class SComponent : public virtual CIntObject //common popup window component
|
||||
|
Reference in New Issue
Block a user