mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge pull request #2310 from IvanSavenko/left_click_refactor
Left click input refactor
This commit is contained in:
@@ -255,19 +255,16 @@ void CComponent::setSurface(std::string defName, int imgPos)
|
||||
image = std::make_shared<CAnimImage>(defName, imgPos);
|
||||
}
|
||||
|
||||
void CComponent::showPopupWindow()
|
||||
void CComponent::showPopupWindow(const Point & cursorPosition)
|
||||
{
|
||||
if(!getDescription().empty())
|
||||
CRClickPopup::createAndPush(getDescription());
|
||||
}
|
||||
|
||||
void CSelectableComponent::clickLeft(tribool down, bool previousState)
|
||||
void CSelectableComponent::clickPressed(const Point & cursorPosition)
|
||||
{
|
||||
if (down)
|
||||
{
|
||||
if(onSelect)
|
||||
onSelect();
|
||||
}
|
||||
if(onSelect)
|
||||
onSelect();
|
||||
}
|
||||
|
||||
void CSelectableComponent::init()
|
||||
|
||||
Reference in New Issue
Block a user