natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
257 stars 81 forks source link

Reimplement MaterialIcon #99

Open natinusala opened 3 years ago

natinusala commented 3 years ago

This is a hairy one because I would like a way to treat Image and MaterialIcon the same way (and potentially more icons / images classes in the future).

The point is to add either an image or an icon in a button, applet frame header, etc... using the same method for both. That way we can swap one for the other without any trouble. The easy way would be to replace the image with a View* but I'm sure we can do better.

The MaterialIcon should not be reimplemented using Label as a base as it is overkill. It should use its own drawing method.

I would also love an abstraction layer for material icons to use a nice enum instead of an ugly char to identify an icon.