Class: Moon::BitmapFont

Inherits:
RenderContext show all
Defined in:
lib/moon/packages/render_primitives/ui/bitmap_font.rb

Overview

Renderer object, for rendering bitmap font Spritesheets

Instance Attribute Summary collapse

Attributes inherited from RenderContext

#id

Attributes included from RenderPrimitive::DataAttributes

#data_attrs

Attributes included from RenderPrimitive::Rectangular

#h, #position, #w

Attributes included from RenderPrimitive::Containable

#parent

Instance Method Summary collapse

Methods inherited from RenderContext

#apply_position_modifier, #post_initialize, #pre_initialize, #render?, #render_abs, #render_content, #screen_bounds, #screen_position, #update

Methods included from RenderPrimitive::DataAttributes

#initialize_data_attrs

Methods included from RenderPrimitive::Rectangular

#align!, #bounds, #contains?, #cx, #cx=, #cy, #cy=, #move, #on_resize, #resize, #to_rect, #x, #x2, #x2=, #x=, #y, #y2, #y2=, #y=, #z, #z=

Methods included from RenderPrimitive::Containable

#containerize, #disown

Methods included from RenderPrimitive::Visibility

#hide, #invisible?, #show, #visible?

Methods included from RenderPrimitive::Renderable

#render, #render?

Methods included from RenderPrimitive::ScreenElement

#contains_pos?, #relative_contains_pos?, #relative_to_screen, #screen_to_relative

Methods included from Eventable

#allow_event?, #clear_events, #each_listener, #each_typed_listener, filter_from_options, #has_events?, #initialize_eventable, #off, #on, #ppd_ev, #trigger, #typing

Methods included from Transitionable

#key_transition, #remove_transitions, #transition

Methods included from TransitionHost

#add_transition, #finish_transitions, #remove_transition, #remove_transitions, #update_transitions

Constructor Details

#initialize(spritesheet, string = '', options = {}) ⇒ BitmapFont


16
17
18
19
20
21
# File 'lib/moon/packages/render_primitives/ui/bitmap_font.rb', line 16

def initialize(spritesheet, string = '', options = {})
  super(options)
  @color = Vector4.new(1.0, 1.0, 1.0, 1.0)
  @spritesheet = spritesheet
  self.string = string
end

Instance Attribute Details

#boldBoolean


9
10
11
# File 'lib/moon/packages/render_primitives/ui/bitmap_font.rb', line 9

def bold
  @bold
end

#colorMoon::Vector4


11
12
13
# File 'lib/moon/packages/render_primitives/ui/bitmap_font.rb', line 11

def color
  @color
end

#stringString


7
8
9
# File 'lib/moon/packages/render_primitives/ui/bitmap_font.rb', line 7

def string
  @string
end