Top Level Namespace

Includes:
Tgui

Defined Under Namespace

Modules: Alias, BangDef, BangNest, BangNestedCaller, Boolean, Interface, Kernel, Packer, Tgui, Unpacker Classes: BoolProperty, BooleanAttribute, Club, ColorAttribute, Enum, ExternObject, FloatAttribute, InterfaceCollectionOut, InterfaceComposedOut, InterfaceSingleOut, Numeric, Object, OutlineAttribute, Page, ProcMethodFactory, Reducer, String, TextStylesAttribute, TextureAttribute, Unit, WhiteGold, WidgetLike

Constant Summary

Constants included from Tgui

Tgui::UIntRect, Tgui::Vector2f, Tgui::Vector2u, Tgui::WIDGETS_COLLECTION

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.def!(name, &b) ⇒ Object



34
35
36
# File 'lib/white_gold.rb', line 34

def def! name, &b
  @wg.page.class.def! name, &b
end

.go(page) ⇒ Object



25
26
27
28
# File 'lib/white_gold.rb', line 25

def go page
  method(page).unbind.bind(@wg) if Symbol === page && !@wg.respond_to?(page)
  @wg.go page
end

.method_missing(name, *a, **na, &b) ⇒ Object



18
19
20
21
22
23
# File 'lib/white_gold.rb', line 18

def method_missing name, *a, **na, &b
  if name.end_with?("!")
    @wg.send(name, *a, **na, &b)
  else super
  end
end

.pageObject



30
31
32
# File 'lib/white_gold.rb', line 30

def page
  @wg.page
end

.respond_to?(name) ⇒ Boolean

Returns:



14
15
16
# File 'lib/white_gold.rb', line 14

def respond_to? name
  super || (name.end_with?("!") && @wg.respond_to?(name))
end

Instance Method Details

#each_file_ancestor(base, dir, &b) ⇒ Object



61
62
63
64
65
66
67
68
69
70
# File 'lib/white_gold/tgui-abi.rb', line 61

def each_file_ancestor base, dir, &b
  base_dir = "#{base}/#{dir}"
  Dir.each_child base_dir do |filename|
    if File.directory? "#{base_dir}/#{filename}"
      each_file_ancestor base, "#{dir}/#{filename}", &b
    else
      b.("#{dir}/#{filename}")
    end
  end
end