PocketSprite / 8bkc-sdk

SDK for programming apps for the PocketSprite
64 stars 20 forks source link

add battery icon to powerbutton menu #16

Closed rorosaurus closed 6 years ago

rorosaurus commented 6 years ago

Adds a tiny battery icon to the powerbutton menu.

@Spritetm are there concerns about importing ugui and widgets here, to maximize resources available to the other apps?

rorosaurus commented 6 years ago

Related: https://github.com/PocketSprite/8bkc-chooser/pull/18

Spritetm commented 6 years ago

So, errm... I don't think this actually works in most cases :) The issue is that the powerbutton menu doesn't necessarily use the same framebuffer as ugui does. If it happens to do (e.g. when you're in an ugui widget and press the power button, and the code uses ugui's frame buffer), the writes will go to the correct framebuffer and everything will work. However, if you, say, have a tilegfx-based framebuffer, the entire thing will either not show or horribly crash.

rorosaurus commented 6 years ago

Ah, okay! I only tested it with the chooser.app and otacon's hello.app, so it makes sense that I would have missed the tilegfx scenario... Good to know! I guess what I'd need to do is create a solution that works for both cases, by avoiding the ugui calls. I'll look closer at how the buttons are rendered in the powerbutton menu.

rorosaurus commented 6 years ago

Aborting this branch, see https://github.com/PocketSprite/8bkc-sdk/pull/18