mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
parent
528f0363a1
commit
df062614d7
@ -488,11 +488,10 @@ void CTerrainRect::clickRight(tribool down, bool previousState)
|
||||
{
|
||||
int3 mp = whichTileIsIt();
|
||||
|
||||
if (!CGI->mh->map->isInTheMap(mp) || down != true)
|
||||
return;
|
||||
|
||||
adventureInt->tileRClicked(mp);
|
||||
if (CGI->mh->map->isInTheMap(mp) && down)
|
||||
adventureInt->tileRClicked(mp);
|
||||
}
|
||||
|
||||
void CTerrainRect::mouseMoved (const SDL_MouseMotionEvent & sEvent)
|
||||
{
|
||||
int3 tHovered = whichTileIsIt(sEvent.x,sEvent.y);
|
||||
|
@ -439,11 +439,15 @@ void CMessage::drawIWindow(CInfoWindow * ret, std::string text, int player)
|
||||
|
||||
|
||||
int curh = SIDE_MARGIN;
|
||||
|
||||
int xOffset = (ret->pos.w - ret->text->pos.w)/2;
|
||||
ret->text->moveBy(Point(xOffset, SIDE_MARGIN));
|
||||
|
||||
//blitTextOnSur (txtg, fontHeight, curh, ret->bitmap);
|
||||
if(!ret->buttons.size() && !ret->components.size()) //improvement for very small text only popups -> center text vertically
|
||||
{
|
||||
if(ret->bitmap->h > ret->text->pos.h + 2*SIDE_MARGIN)
|
||||
curh = (ret->bitmap->h - ret->text->pos.h)/2;
|
||||
}
|
||||
|
||||
ret->text->moveBy(Point(xOffset, curh));
|
||||
|
||||
curh += ret->text->pos.h;
|
||||
|
||||
|
@ -500,6 +500,11 @@ CInfoWindow::CInfoWindow(std::string Text, int player, const TCompsInfo &comps,
|
||||
}
|
||||
|
||||
text = new CTextBox(Text, Rect(0, 0, 250, 100), 0, FONT_MEDIUM, CENTER, zwykly);
|
||||
if(!text->slider)
|
||||
{
|
||||
text->pos.w = text->maxW;
|
||||
text->pos.h = text->maxH;
|
||||
}
|
||||
text->redrawParentOnScrolling = true;
|
||||
|
||||
if(buttons.size())
|
||||
|
Loading…
Reference in New Issue
Block a user