mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +02:00
Fix positioning of console log overlay
This commit is contained in:
parent
5e90d40e8b
commit
64cc246358
@ -52,7 +52,7 @@ void CInGameConsole::show(SDL_Surface * to)
|
|||||||
Point leftBottomCorner(0, pos.h);
|
Point leftBottomCorner(0, pos.h);
|
||||||
Point textPosition(leftBottomCorner.x + 50, leftBottomCorner.y - texts.size() * 20 - 80 + number * 20);
|
Point textPosition(leftBottomCorner.x + 50, leftBottomCorner.y - texts.size() * 20 - 80 + number * 20);
|
||||||
|
|
||||||
graphics->fonts[FONT_MEDIUM]->renderTextLeft(to, text.text, Colors::GREEN, textPosition );
|
graphics->fonts[FONT_MEDIUM]->renderTextLeft(to, text.text, Colors::GREEN, pos.topLeft() + textPosition );
|
||||||
|
|
||||||
number++;
|
number++;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,12 @@ BattleFieldController::BattleFieldController(BattleInterface & owner):
|
|||||||
|
|
||||||
updateAccessibleHexes();
|
updateAccessibleHexes();
|
||||||
addUsedEvents(LCLICK | RCLICK | MOVE);
|
addUsedEvents(LCLICK | RCLICK | MOVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BattleFieldController::activate()
|
||||||
|
{
|
||||||
LOCPLINT->cingconsole->pos = this->pos;
|
LOCPLINT->cingconsole->pos = this->pos;
|
||||||
|
CIntObject::activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleFieldController::createHeroes()
|
void BattleFieldController::createHeroes()
|
||||||
|
@ -66,6 +66,7 @@ class BattleFieldController : public CIntObject
|
|||||||
void mouseMoved(const Point & cursorPosition) override;
|
void mouseMoved(const Point & cursorPosition) override;
|
||||||
void clickLeft(tribool down, bool previousState) override;
|
void clickLeft(tribool down, bool previousState) override;
|
||||||
void clickRight(tribool down, bool previousState) override;
|
void clickRight(tribool down, bool previousState) override;
|
||||||
|
void activate() override;
|
||||||
|
|
||||||
void showAll(SDL_Surface * to) override;
|
void showAll(SDL_Surface * to) override;
|
||||||
void show(SDL_Surface * to) override;
|
void show(SDL_Surface * to) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user