1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Show option description on hovering

This commit is contained in:
Ivan Savenko
2023-07-19 17:08:15 +03:00
parent 8c4faa24f4
commit f3508bdfda
3 changed files with 14 additions and 6 deletions

View File

@@ -351,11 +351,11 @@ void CGarrisonSlot::gesture(bool on, const Point & initialPosition, const Point
return;
std::vector<RadialMenuConfig> menuElements = {
{ RadialMenuConfig::ITEM_NW, "stackMerge", "", [this](){owner->bulkMergeStacks(this);} },
{ RadialMenuConfig::ITEM_NE, "stackInfo", "", [this](){viewInfo();} },
{ RadialMenuConfig::ITEM_WW, "stackSplitOne", "", [this](){splitIntoParts(this->getGarrison(), 1); } },
{ RadialMenuConfig::ITEM_EE, "stackSplitEqual", "", [this](){owner->bulkSmartSplitStack(this);} },
{ RadialMenuConfig::ITEM_SW, "heroMove", "", [this](){owner->moveStackToAnotherArmy(this);} },
{ RadialMenuConfig::ITEM_NW, "stackMerge", "Merge same units", [this](){owner->bulkMergeStacks(this);} },
{ RadialMenuConfig::ITEM_NE, "stackInfo", "Show unit information", [this](){viewInfo();} },
{ RadialMenuConfig::ITEM_WW, "stackSplitOne", "Split off single unit", [this](){splitIntoParts(this->getGarrison(), 1); } },
{ RadialMenuConfig::ITEM_EE, "stackSplitEqual", "Split unit equally", [this](){owner->bulkSmartSplitStack(this);} },
{ RadialMenuConfig::ITEM_SW, "heroMove", "Move unit to another army", [this](){owner->moveStackToAnotherArmy(this);} },
};
GH.windows().createAndPushWindow<RadialMenu>(pos.center(), menuElements);