Resources Class Reference

#include <resources.hpp>

List of all members.

Static Public Member Functions

static void load_shared ()
static void unload_shared ()

Static Public Attributes

static MouseCursormouse_cursor
static FontPtr fixed_font
static FontPtr normal_font
static FontPtr small_font
static FontPtr big_font


Detailed Description

Definition at line 25 of file resources.hpp.


Member Function Documentation

void Resources::load_shared (  )  [static]

Definition at line 35 of file resources.cpp.

References big_font, Font::FIXED, fixed_font, mouse_cursor, normal_font, MouseCursor::set_current(), small_font, sprite_manager, tile_manager, and Font::VARIABLE.

Referenced by Main::run().

00036 {
00037   /* Load the mouse-cursor */
00038   mouse_cursor = new MouseCursor("images/engine/menu/mousecursor.png");
00039   MouseCursor::set_current(mouse_cursor);
00040 
00041   /* Load global images: */
00042   fixed_font.reset(new Font(Font::FIXED, "fonts/white.stf"));
00043   normal_font.reset(new Font(Font::VARIABLE, "fonts/white.stf"));
00044   small_font.reset(new Font(Font::VARIABLE, "fonts/white-small.stf", 1));
00045   big_font.reset(new Font(Font::VARIABLE, "fonts/white-big.stf", 3));
00046 
00047   tile_manager   = new TileManager();
00048   sprite_manager = new SpriteManager();
00049 }

void Resources::unload_shared (  )  [static]

Definition at line 53 of file resources.cpp.

References big_font, fixed_font, mouse_cursor, normal_font, small_font, and sprite_manager.

Referenced by Main::run().

00054 {
00055   /* Free global images: */
00056   fixed_font.reset();
00057   normal_font.reset();
00058   small_font.reset();
00059   big_font.reset();
00060 
00061   delete sprite_manager;
00062   sprite_manager = NULL;
00063 
00064   /* Free mouse-cursor */
00065   delete mouse_cursor;
00066 }


Member Data Documentation

MouseCursor * Resources::mouse_cursor [static]

Definition at line 28 of file resources.hpp.

Referenced by load_shared(), and unload_shared().

FontPtr Resources::fixed_font [static]

Definition at line 30 of file resources.hpp.

Referenced by PlayerStatus::draw(), load_shared(), and unload_shared().

FontPtr Resources::normal_font [static]

Definition at line 31 of file resources.hpp.

Referenced by SecretAreaTrigger::draw(), Climbable::draw(), LevelIntro::draw(), LevelTime::draw(), FloatingText::draw(), Menu::draw(), Statistics::draw_endseq_panel(), Menu::draw_item(), worldmap::WorldMap::draw_status(), get_font_by_format_char(), load_shared(), TextObject::set_font(), MenuItem::set_help(), TextObject::TextObject(), and unload_shared().

FontPtr Resources::small_font [static]

Definition at line 32 of file resources.hpp.

Referenced by TitleScreen::draw(), LevelIntro::draw(), ScreenManager::draw_fps(), Statistics::draw_worldmap_info(), get_font_by_format_char(), load_shared(), TextObject::set_font(), and unload_shared().

FontPtr Resources::big_font [static]

Definition at line 33 of file resources.hpp.

Referenced by Menu::draw_item(), get_font_by_format_char(), Menu::get_width(), load_shared(), TextObject::set_font(), and unload_shared().


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:34 2014 for SuperTux by  doxygen 1.5.1