turbobadger
turbobadger copied to clipboard
TBImageManager improvements
TBImageManager needs these improvements to be useful:
- Cache with configurable size. Currently it throws away images immediately when they are not in use.
- HasImage(name), NewImage(name) in addition to the current GetImage(name). GetImage could still load (treating name as filename) synchronously for backward compability.
- Possibility to change image content (and probably state for EMPTY/LOADING/READY). Needs listener callbacks.
The last two points must make it possible to off-load loading to worked thread.