Closed rorosaurus closed 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.
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.
Aborting this branch, see https://github.com/PocketSprite/8bkc-sdk/pull/18
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?