- move it to separate class, so that it can be displayed in Overworld too
- add a possibility to scale the interface (atm. only in config.xml)
- touch steering buttons are created only for single player races
I removed unused drawEnergyMeter function from Overworld GUI. The reason was that I use this function from race_gui.cpp for nitro button and this function in overworld breaks it. And still the proper drawEnergyMeter function is available in race_gui.cpp and can be moved to RaceGuiBase if it will be needed in Overworld in future.
I moved the font size computation to the top of constructor because I use it to check available space for minimap.
- don't update a button that is already not pressed
- use full axis range, which means higher sensitivity in the center
- make sure that we don't divide by 0
It will be used for steering on Android.
There are some limitations:
- currently it works only in single player mode (but I don't see any reason to make it working for multiplayer)
- speedometer is not available in race GUI because there is no place for it
TODO:
- add DPI support (race GUI should have probably different proportions on smaller devices for comfortable playing)
- make nice button images
- make nitro button that changes its look depending on collected nitro (a kind of nitro bar)
Touch input events must be handled in android device to make use of it. It can be simulated for debugging on non-android devices using standard mouse.
It allows to increase performance on devices that have only one available resolution.
It also allows to draw GUI elements in full resolution while rendering the scene with slightly lower resolution, which gives you few additional FPS.
Note that particles don't work as expected yet with this feature.
This causes issues in follow the leader races, because after sorting the leader is not leader anymore.
This sorting function is most probably not needed because the list is sorted in startNextRace function (where the leader is properly skipped).
Degraded_IBL parameter was probably accidentally set to false because option in settings means "enable IBL if true", but variable means "disable IBL if true".