RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.69k stars 1.93k forks source link

[Feature request] Add text scrolling to On-Screen Keyboard #16015

Open Pacomatic1 opened 3 months ago

Pacomatic1 commented 3 months ago

Quick summary

The on-screen keyboard does not support (horizontal) text scrolling. Considering that some games (namely LittleBigPlanet) allow you to put in lots of text, this is very bad since you can't see what you're typing.

Luckily, typing off-screen is something you can do with no issue. Example: I input 5 dots at the end, shown by my inputs and the LittleBigPlanet chat message. But the on-screen keyboard preview only shows 2, because those dots are off screen.

https://github.com/user-attachments/assets/2fff64c6-daf9-4515-9b6a-9e4cf1b481ce

Details

The text preview should move towards the cursor whenever the cursor goes off-screen, always prioritizing visibility of the cursor. image (You can see all 5 dots because I did the scrolling in paint.net)

If the cursor were to go left now, then the text would not scroll towards the cursor unless the cursor went off-screen again.

kd-11 commented 3 months ago

We can render to a large surface and apply a clip border or just count the number of characters and try to shift along with that. First one provides smoother scrolling at the cost of slightly more memory, second one I don't really see any major upsides.

Pacomatic1 commented 3 months ago

By smooth, you mean lerping to the new position?

If so, then I'd rather we use the latter since smooth scrolling isn't that nice when you're scrolling by cursor. Main reason for that is responsiveness. I want it snappy.

But if we used a scroll bar then 1 would be justified.