Class: Tgui::ChatBox::Line

Inherits:
WidgetLike show all
Defined in:
lib/white_gold/dsl/chat_box.rb

Instance Attribute Summary

Attributes inherited from WidgetLike

#host, #id

Instance Method Summary collapse

Methods inherited from WidgetLike

abi_attr, abi_bit_enum, abi_def, abi_enum, #flags=, self_abi_def, self_abi_def_setter, self_abi_def_setter_with_id, self_abi_def_with_id, self_packers_id_extend

Methods included from BangDef

#def!

Methods included from BangNest

#method_missing, #respond_to?

Methods included from BangNestedCaller

#bang_method_missing, #bang_object_stack, #bang_respond_to?, #self!, #upon!

Constructor Details

#initialize(chat_box, index) ⇒ Line



26
27
28
29
# File 'lib/white_gold/dsl/chat_box.rb', line 26

def initialize chat_box, index
  @chat_box = chat_box
  @index = index
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BangNest

Instance Method Details

#colorObject



31
32
33
# File 'lib/white_gold/dsl/chat_box.rb', line 31

def color
  @chat_box._abi_get_line_color abi_pack_integer(@index)
end

#styleObject



35
36
37
# File 'lib/white_gold/dsl/chat_box.rb', line 35

def style
  abi_unpack_text_styles(@chat_box._abi_get_line_style abi_pack_integer(@index))
end