libretro/RetroArch — pull request #352 by Themaister (2013-10-21 12:30:14+00:00)
Title: Overlay rework

I've reworked the overlay stuff a bit which should make it much more usable. It is 100% backwards compat with the older format.

The major thing here is that we can have overlays per-button now, and not the old case where we had one big overlay and button descriptors for each. Going to per-button overlays, we get new things such as:

- Less texture bandwidth used, we only draw where buttons actually are instead of over the whole screen.
- If a button is pressed, it can light up a bit more (alpha_mod).
- If a button is pressed, the hitbox can grow bigger until it's released (range_mod).
- A way to create descriptors without associated input. Allows for arbitrary images pasted on the screen.
- Makes it far, far, easier to customize an overlay as you can tweak the config and buttons will move as well. It's also far easier to see that the hitboxes are correct.

In addition, a normalized coordinate mode is added. Before, coordinates for hitboxes were in pixels, and were normalized later based on the base overlay size. As we aren't required anymore to have a big overlay splatted across the screen, we need a way to use normalized coordinates directly.

I've put an example of this in media/overlays/example.