mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-18 08:50:29 +02:00
Fix mouse focus for TextEdit
This commit is contained in:
1 parent
1f65b326a8
commit
e0b75ff7e6
1 file changed
+6
-4
+6
-4
@@ -1334,11 +1334,13 @@ static std::string FirstLine(const std::string &text) {
|
||||
|
||||
bool TextEdit::Touch(const TouchInput &touch) {
|
||||
if (touch.flags & TouchInputFlags::DOWN) {
|
||||
Bounds textBounds = bounds_.Inset(padding_.left, padding_.top, padding_.right, padding_.bottom);
|
||||
if (textBounds.Contains(touch.x, touch.y)) {
|
||||
if (bounds_.Contains(touch.x, touch.y)) {
|
||||
SetFocusedView(this, true);
|
||||
int relativeX = touch.x - textBounds.x + scrollPos_;
|
||||
selectAtX_ = relativeX;
|
||||
Bounds textBounds = bounds_.Inset(padding_.left, padding_.top, padding_.right, padding_.bottom);
|
||||
if (textBounds.Contains(touch.x, touch.y)) {
|
||||
int relativeX = touch.x - textBounds.x + scrollPos_;
|
||||
selectAtX_ = relativeX;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user