xfangfang / borealis

Hardware accelerated, Nintendo Switch inspired UI library for PC, Android, iOS, PSV, PS4 and Nintendo Switch
Apache License 2.0
31 stars 21 forks source link

Hints sorting crash fix #83

Closed XITRIX closed 2 months ago

XITRIX commented 2 months ago

Previous sorting implementation failed to satisfy strict weak ordering rule. It could lead to crashes with some compilers if they have built-in validation for that (CLang i.e.)

xfangfang commented 2 months ago

Sorry for the delayed response, I may have missed the email.


I have an additional question about the Hints. I noticed that the Hints button A is not allowed to be touched by default.

https://github.com/xfangfang/borealis/blob/1c85be17b9d0ce907c0d8393dba65b114664829e/library/lib/views/hint.cpp#L66

Some users have asked me why they cannot click button A. And I checked the official bottom hint of Switch UI and found that they can be clicked. So, should we allow the bottom button A to be clickable by default?

XITRIX commented 2 months ago

No worries at all, thanks! Speaking about "OK" action, try to touch "OK" when you already in touch mode and you could notice that it will not work, you can click it only if HOS is in "gamepad" mode yet. Clicking "OK" in most cases make no sense for me, because in gamepad mode, you need to focus element first and then perform action attached to focused element by pressing "OK", but in touchscreen mode you perform both of this actions at the same time, you cannot focus item without performing it's action, so it make sense to have clickable "OK" on it At least I think about it in this way