void UIInputBox::handleKeyUp(const Common::KeyState &kbd) { if (_isVisible) { if (charIsValid(kbd)) { _text += kbd.ascii; } else if (kbd.keycode == Common::KEYCODE_BACKSPACE) { _text.deleteLastChar(); } else if (kbd.keycode == Common::KEYCODE_RETURN && !_text.empty()) { if (_valueChangedCallback) { _valueChangedCallback(_callbackData, this); } } } }
void UICheckBox::handleMouseDown(bool alternateButton) { if (!alternateButton) { if (_isEnabled && _hasFocus) { _isChecked = !_isChecked; if (_valueChangedCallback) { _valueChangedCallback(_callbackData, this); } _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(509), 100, 0, 0, 50, 0); } else { _isPressed = true; } } }