mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Prevent chat menu touch to fall throght
This commit is contained in:
parent
b6e7fe1aaf
commit
c9deeae6f1
1 changed files with 11 additions and 5 deletions
|
@ -545,11 +545,17 @@ inline float clamp1(float x) {
|
|||
bool EmuScreen::touch(const TouchInput &touch) {
|
||||
Core_NotifyActivity();
|
||||
|
||||
if (chatMenu_ && (touch.flags & TOUCH_DOWN) != 0 && !chatMenu_->Contains(touch.x, touch.y)) {
|
||||
chatMenu_->Close();
|
||||
if (chatButton_)
|
||||
chatButton_->SetVisibility(UI::V_VISIBLE);
|
||||
UI::EnableFocusMovement(false);
|
||||
if (chatMenu_ && chatMenu_->GetVisibility() == UI::V_VISIBLE) {
|
||||
// Avoid pressing touch button behind the chat
|
||||
if (chatMenu_->Contains(touch.x, touch.y)) {
|
||||
chatMenu_->Touch(touch);
|
||||
return true;
|
||||
} else if ((touch.flags & TOUCH_DOWN) != 0) {
|
||||
chatMenu_->Close();
|
||||
if (chatButton_)
|
||||
chatButton_->SetVisibility(UI::V_VISIBLE);
|
||||
UI::EnableFocusMovement(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (root_) {
|
||||
|
|
Loading…
Add table
Reference in a new issue