Called from window. Notifies that button has been clicked.
| 357 | |
| 358 | // Called from window. Notifies that button has been clicked. |
| 359 | void CClickWindowController::NotifyButtonClick (CClickWindowController::EButton button) |
| 360 | { |
| 361 | if (m_enabled) |
| 362 | { |
| 363 | if (button== CClickWindowController::NO_CLICK) |
| 364 | // Disable click |
| 365 | m_enabled= false; |
| 366 | else |
| 367 | { |
| 368 | if (m_fastMode || (m_currentButton!= m_lockedButton && button== m_currentButton)) |
| 369 | m_lockedButton= button; |
| 370 | m_currentButton= button; |
| 371 | } |
| 372 | |
| 373 | m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton()); |
| 374 | } |
| 375 | else |
| 376 | { |
| 377 | // Disabled state. Only handle NO_CLICK button |
| 378 | if (button== CClickWindowController::NO_CLICK) |
| 379 | { |
| 380 | m_enabled= true; |
| 381 | |
| 382 | m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton()); |
| 383 | } |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | // Called from window. Notifies that button has been entered |
| 388 | void CClickWindowController::NotifyButtonEnter (CClickWindowController::EButton button) |