1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* custom statusbar in town interface

* added missing file
This commit is contained in:
Michał W. Urbańczyk
2008-01-27 20:37:10 +00:00
parent 74cce9b7a0
commit 9ed4f66cb7
10 changed files with 126 additions and 50 deletions

View File

@@ -459,37 +459,6 @@ void CTownList::draw()
else
blitAt(arrdo->ourImages[2].bitmap,arrdop.x,arrdop.y);
}
CStatusBar::CStatusBar(int x, int y)
{
bg=CGI->bitmaph->loadBitmap("ADROLLVR.bmp");
SDL_SetColorKey(bg,SDL_SRCCOLORKEY,SDL_MapRGB(bg->format,0,255,255));
pos.x=x;
pos.y=y;
pos.w=bg->w;
pos.h=bg->h;
middlex=(bg->w/2)+x;
middley=(bg->h/2)+y;
}
CStatusBar::~CStatusBar()
{
SDL_FreeSurface(bg);
}
void CStatusBar::clear()
{
current="";
blitAt(bg,pos.x,pos.y);
}
void CStatusBar::print(std::string text)
{
current=text;
blitAt(bg,pos.x,pos.y);
printAtMiddle(current,middlex,middley,GEOR13,zwykly);
}
void CStatusBar::show()
{
blitAt(bg,pos.x,pos.y);
printAtMiddle(current,middlex,middley,GEOR13,zwykly);
}
CMinimap::CMinimap(bool draw)
{
statusbarTxt = CGI->preth->advWorldMap.first;
@@ -1360,6 +1329,7 @@ void CAdvMapInt::deactivate()
void CAdvMapInt::show()
{
LOCPLINT->curint = this;
LOCPLINT->statusbar = &statusbar;
blitAt(bg,0,0);
kingOverview.show();