|
@@ -72,16 +72,6 @@ void CButton::addPopupCallback(const std::function<void()> & callback)
|
|
|
this->callbackPopup += callback;
|
|
|
}
|
|
|
|
|
|
-void CButton::addHoverCallback(const std::function<void(bool)> & callback)
|
|
|
-{
|
|
|
- this->hoverCallback += callback;
|
|
|
-}
|
|
|
-
|
|
|
-void CButton::addPanningCallback(const std::function<void(const Point &, const Point &, const Point &)> & callback)
|
|
|
-{
|
|
|
- this->panningCallback += callback;
|
|
|
-}
|
|
|
-
|
|
|
void ButtonBase::setTextOverlay(const std::string & Text, EFonts font, ColorRGBA color)
|
|
|
{
|
|
|
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255-DISPOSE);
|
|
@@ -312,8 +302,6 @@ void CButton::showPopupWindow(const Point & cursorPosition)
|
|
|
|
|
|
void CButton::hover (bool on)
|
|
|
{
|
|
|
- hoverCallback(on);
|
|
|
-
|
|
|
if(hoverable && !isBlocked())
|
|
|
{
|
|
|
if(on)
|
|
@@ -338,11 +326,6 @@ void CButton::hover (bool on)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void CButton::gesturePanning(const Point & initialPosition, const Point & currentPosition, const Point & lastUpdateDistance)
|
|
|
-{
|
|
|
- panningCallback(initialPosition, currentPosition, lastUpdateDistance);
|
|
|
-}
|
|
|
-
|
|
|
ButtonBase::ButtonBase(Point position, const AnimationPath & defName, EShortcut key, bool playerColoredButton)
|
|
|
: CKeyShortcut(key)
|
|
|
, stateToIndex({0, 1, 2, 3})
|
|
@@ -375,7 +358,7 @@ CButton::CButton(Point position, const AnimationPath &defName, const std::pair<s
|
|
|
soundDisabled(false)
|
|
|
{
|
|
|
defActions = 255-DISPOSE;
|
|
|
- addUsedEvents(LCLICK | SHOW_POPUP | HOVER | KEYBOARD | GESTURE);
|
|
|
+ addUsedEvents(LCLICK | SHOW_POPUP | HOVER | KEYBOARD);
|
|
|
hoverTexts[0] = help.first;
|
|
|
}
|
|
|
|