mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 02:12:37 +01:00
Fix 8c58fb1efd: Doubled beep sounds when clicking toolbar buttons.
* ShowDropDownList() now issues a beep, so individual toolbar buttons no longer need to do it. * HandleButtonClick() may be called twice for some buttons, as it is called by automatically for PUSH buttons. This caused some beeps to sound louder than others.
This commit is contained in:
committed by
Peter Nelson
parent
ce166bbbc3
commit
69697a62d3
@@ -594,6 +594,9 @@ EventState Window::OnHotkey(int hotkey)
|
||||
*/
|
||||
void Window::HandleButtonClick(WidgetID widget)
|
||||
{
|
||||
/* Button click for this widget may already have been handled. */
|
||||
if (this->IsWidgetLowered(widget) && this->timeout_timer == TIMEOUT_DURATION) return;
|
||||
|
||||
this->LowerWidget(widget);
|
||||
this->SetTimeout();
|
||||
this->SetWidgetDirty(widget);
|
||||
|
||||
Reference in New Issue
Block a user