mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
GUI: Don't display tooltips while dragging mouse
Displaying it cancels the dragging.
This commit is contained in:
parent
f288364e73
commit
c276e89888
@ -82,6 +82,8 @@ public:
|
|||||||
void setFocusWidget(Widget *widget);
|
void setFocusWidget(Widget *widget);
|
||||||
Widget *getFocusWidget() { return _focusedWidget; }
|
Widget *getFocusWidget() { return _focusedWidget; }
|
||||||
|
|
||||||
|
bool isDragging() const { return _dragWidget != nullptr; }
|
||||||
|
|
||||||
void setTickleWidget(Widget *widget) { _tickleWidget = widget; }
|
void setTickleWidget(Widget *widget) { _tickleWidget = widget; }
|
||||||
void unSetTickleWidget() { _tickleWidget = nullptr; }
|
void unSetTickleWidget() { _tickleWidget = nullptr; }
|
||||||
Widget *getTickleWidget() { return _tickleWidget; }
|
Widget *getTickleWidget() { return _tickleWidget; }
|
||||||
|
@ -539,7 +539,8 @@ void GuiManager::runLoop() {
|
|||||||
// then delay showing the tooltip based on the value of kTooltipSameWidgetDelay.
|
// then delay showing the tooltip based on the value of kTooltipSameWidgetDelay.
|
||||||
uint32 systemMillisNowForTooltipCheck = _system->getMillis(true);
|
uint32 systemMillisNowForTooltipCheck = _system->getMillis(true);
|
||||||
if ((_lastTooltipShown.x != _lastMousePosition.x || _lastTooltipShown.y != _lastMousePosition.y)
|
if ((_lastTooltipShown.x != _lastMousePosition.x || _lastTooltipShown.y != _lastMousePosition.y)
|
||||||
&& _lastMousePosition.time + kTooltipDelay < systemMillisNowForTooltipCheck) {
|
&& _lastMousePosition.time + kTooltipDelay < systemMillisNowForTooltipCheck
|
||||||
|
&& !activeDialog->isDragging()) {
|
||||||
Widget *wdg = activeDialog->findWidget(_lastMousePosition.x, _lastMousePosition.y);
|
Widget *wdg = activeDialog->findWidget(_lastMousePosition.x, _lastMousePosition.y);
|
||||||
if (wdg && wdg->hasTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)
|
if (wdg && wdg->hasTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)
|
||||||
&& (_lastTooltipShown.wdg != wdg || _lastTooltipShown.time + kTooltipSameWidgetDelay < systemMillisNowForTooltipCheck)) {
|
&& (_lastTooltipShown.wdg != wdg || _lastTooltipShown.time + kTooltipSameWidgetDelay < systemMillisNowForTooltipCheck)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user