resources.hpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // SuperTux
  2. // Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
  3. // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
  4. //
  5. // This program is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef HEADER_SUPERTUX_SUPERTUX_RESOURCES_HPP
  18. #define HEADER_SUPERTUX_SUPERTUX_RESOURCES_HPP
  19. #include <memory>
  20. #include <string>
  21. #include "util/gettext.hpp"
  22. #include "video/font_ptr.hpp"
  23. #include "video/surface_ptr.hpp"
  24. class MouseCursor;
  25. class Resources final
  26. {
  27. public:
  28. static std::unique_ptr<MouseCursor> mouse_cursor;
  29. /** Font that can display English glyphs */
  30. static FontPtr default_font;
  31. /** Font used in the console */
  32. static FontPtr console_font;
  33. /** A version of the regular font with fixed spacing for displaying
  34. coin counts and other numbers in the HUD */
  35. static FontPtr fixed_font;
  36. /** Regular sized font for menus and text scrolls. */
  37. static FontPtr normal_font;
  38. /** Small font for statistics, FPS, etc. */
  39. static FontPtr small_font;
  40. /** Big font for menu titles and headers in text scrolls */
  41. static FontPtr big_font;
  42. /** Font used for control interface elements (particle editor) */
  43. static FontPtr control_font;
  44. static SurfacePtr checkbox;
  45. static SurfacePtr checkbox_checked;
  46. static SurfacePtr back;
  47. static SurfacePtr arrow_left;
  48. static SurfacePtr arrow_right;
  49. static SurfacePtr no_tile;
  50. public:
  51. static void load();
  52. static void unload();
  53. static bool needs_custom_font(const tinygettext::Language& locale);
  54. static std::string get_font_for_locale(const tinygettext::Language& locale);
  55. private:
  56. static std::string current_font;
  57. public:
  58. Resources();
  59. ~Resources();
  60. };
  61. #endif
  62. /* EOF */