Method: Rubygame::TTF.setup
- Defined in:
- lib/rubygame/ttf.rb
.setup ⇒ Object
Attempt to setup the TTF class for use by initializing SDL_ttf. This must be called before the TTF class can be used. Raises SDLError if there is a problem initializing SDL_ttf.
44 45 46 47 48 49 |
# File 'lib/rubygame/ttf.rb', line 44 def self.setup if( SDL::TTF.WasInit() == 0 and SDL::TTF.Init() != 0 ) raise( Rubygame::SDLError, "Could not setup TTF class: #{SDL.GetError()}" ) end end |