mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Replaced clickRight event with showPopupWindow/closePopupWindow
This commit is contained in:
@@ -90,18 +90,15 @@ InfoBox::InfoBox(Point position, InfoPos Pos, InfoSize Size, std::shared_ptr<IIn
|
||||
|
||||
InfoBox::~InfoBox() = default;
|
||||
|
||||
void InfoBox::clickRight(tribool down, bool previousState)
|
||||
void InfoBox::showPopupWindow()
|
||||
{
|
||||
if (down)
|
||||
{
|
||||
std::shared_ptr<CComponent> comp;
|
||||
std::string text;
|
||||
data->prepareMessage(text, comp);
|
||||
if (comp)
|
||||
CRClickPopup::createAndPush(text, CInfoWindow::TCompsInfo(1, comp));
|
||||
else if (!text.empty())
|
||||
CRClickPopup::createAndPush(text);
|
||||
}
|
||||
std::shared_ptr<CComponent> comp;
|
||||
std::string text;
|
||||
data->prepareMessage(text, comp);
|
||||
if (comp)
|
||||
CRClickPopup::createAndPush(text, CInfoWindow::TCompsInfo(1, comp));
|
||||
else if (!text.empty())
|
||||
CRClickPopup::createAndPush(text);
|
||||
}
|
||||
|
||||
void InfoBox::clickLeft(tribool down, bool previousState)
|
||||
|
||||
Reference in New Issue
Block a user