PSP-Archive / ARK-4

Custom Firmware for the PSP and PS Vita.
555 stars 40 forks source link

System Menu Fixes and Changes #380

Closed maodus closed 1 week ago

maodus commented 1 week ago

This is a PR fixes the circle button behavior in the system menu, fixes possible crash from buffer overflow with battery display, and makes the UI code space a little easier to work with by ditching many hardcodes offsets. Additionally, System menu text while changing entries, will now always be centered regardless of font and font size.

This PR can be merged in its current state (maybe test it out for yourselves to see if i missed anything), I haven't tested all the themes, but I will get to that eventually. However, Id like to propose a few things to improve the flexibility of the UI.

Firstly, i noticed that many themes do not have the same sizes for certain sprites, meaning that every theme will differ in menu proportions. Since the scope of this PR is the system_manager, id like to request that instead of drawing the full dimension image of each entry's icon sprite (while in LARGE mode), that we instead draw a scaled version so that the proportions stay in tact.

Secondly, id like to modify the UI so that large displays 3 entries at most, medium displays 4, and small displays 5. Doing so will make the UI more consistent and will allow for a lot less hardcoded offsets.

Lastly, I might not be able to but if you guys want, i can try add better support for translated text positions. Changing the UI based on the users translated language could be problematic here because it could require changing various margins that will make the UI different from language to language, but I haven't looked far into it so I don't know the full scope of limitations.

Dont accept this PR if you want me to implement any of the above and this will just kind of be a WIP PR in the meantime.

JoseAaronLopezGarcia commented 1 week ago

Looks great.

The only sprite that can have any proportion is BOX.PNG, the reason for this is that it's used everywhere to create "windows" so it needs to be scaled to any size without it looking bad. Some themes have more detail on this sprite so it's bigger, but also slower to draw, while other themes have much smaller and therefore faster to draw but with less detail.

I'll merge this if you want, or you can do whatever else you think needs to be done. I'll wait for your input.

maodus commented 1 week ago

Well since the other changes I proposed are more optional than necessary, and because the current state of the PR actually fixes some things, I'd say just merge it for now. I'm out of town for a week so I wasn't able to test all the themes, but theoretically it should not matter. When I'm back home I'll try and cook something up that makes the margins a little more consistent.

maodus commented 1 week ago

I thought I fixed the tabbing and spacing but it seems nano screwed them up in the source file again. Ill fix it up next week. Sorry about that.

krazynez commented 1 week ago

I thought I fixed the tabbing and spacing but it seems nano screwed them up in the source file again. Ill fix it up next week. Sorry about that.

ewww nano

maodus commented 1 week ago

I thought I fixed the tabbing and spacing but it seems nano screwed them up in the source file again. Ill fix it up next week. Sorry about that.

ewww nano

Mb, lemme just type in a cheat code to save and quit my file in VIM for next time :sob:

krazynez commented 1 week ago

I thought I fixed the tabbing and spacing but it seems nano screwed them up in the source file again. Ill fix it up next week. Sorry about that.

ewww nano

Mb, lemme just type in a cheat code to save and quit my file in VIM for next time 😭

Finally you have grown up.