Class: Moon::Text::FontChangedEvent

Inherits:
Event show all
Defined in:
lib/moon/packages/render_primitives/ui/text.rb

Overview

A FontChangedEvent is triggered when the Text#font changes, note this event will trigger event if the Font's value is the same.

Instance Attribute Summary collapse

Attributes inherited from Event

#id, #type

Instance Method Summary collapse

Methods inherited from Event

make_filter

Constructor Details

#initialize(old, font) ⇒ FontChangedEvent


37
38
39
40
41
# File 'lib/moon/packages/render_primitives/ui/text.rb', line 37

def initialize(old, font)
  @old = old
  @font = font
  super :text_font_changed
end

Instance Attribute Details

#fontObject

Returns the value of attribute font


33
34
35
# File 'lib/moon/packages/render_primitives/ui/text.rb', line 33

def font
  @font
end

#oldFont


30
31
32
# File 'lib/moon/packages/render_primitives/ui/text.rb', line 30

def old
  @old
end

#stringFont


33
# File 'lib/moon/packages/render_primitives/ui/text.rb', line 33

attr_accessor :font