mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Merge pull request #2152 from IvanSavenko/fix_console
Fix console activation via mouse click / touch
This commit is contained in:
commit
0a874cd89e
@ -52,7 +52,7 @@ void CInGameConsole::show(SDL_Surface * to)
|
||||
Point leftBottomCorner(0, pos.h);
|
||||
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++;
|
||||
}
|
||||
|
@ -69,7 +69,12 @@ BattleFieldController::BattleFieldController(BattleInterface & owner):
|
||||
|
||||
updateAccessibleHexes();
|
||||
addUsedEvents(LCLICK | RCLICK | MOVE);
|
||||
}
|
||||
|
||||
void BattleFieldController::activate()
|
||||
{
|
||||
LOCPLINT->cingconsole->pos = this->pos;
|
||||
CIntObject::activate();
|
||||
}
|
||||
|
||||
void BattleFieldController::createHeroes()
|
||||
|
@ -66,6 +66,7 @@ class BattleFieldController : public CIntObject
|
||||
void mouseMoved(const Point & cursorPosition) override;
|
||||
void clickLeft(tribool down, bool previousState) override;
|
||||
void clickRight(tribool down, bool previousState) override;
|
||||
void activate() override;
|
||||
|
||||
void showAll(SDL_Surface * to) override;
|
||||
void show(SDL_Surface * to) override;
|
||||
|
@ -456,7 +456,7 @@ void CGStatusBar::clickLeft(tribool down, bool previousState)
|
||||
void CGStatusBar::activate()
|
||||
{
|
||||
GH.statusbar = shared_from_this();
|
||||
CIntObject::deactivate();
|
||||
CIntObject::activate();
|
||||
}
|
||||
|
||||
void CGStatusBar::deactivate()
|
||||
|
Loading…
Reference in New Issue
Block a user