Method: Ig3tool::VendingMachineWindow#initialize
- Defined in:
- lib/ui/automaatwindow.rb
#initialize ⇒ VendingMachineWindow
Returns a new instance of VendingMachineWindow.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ui/automaatwindow.rb', line 27 def initialize super("vendingmachine.glade") @notification = @glade.("notification") @entries = [ ] [[BLIKJES, @glade.("blikjes_table")], [FLESJES, @glade.("flesjes_table")]]. each do |list, table| table.resize(list.length, 2) list.each_with_index do |(name, ), i| label = Gtk::Label.new(name + ":") label.set_alignment(0, 0.5) table.attach(label, 0, 1, i, i + 1) entry = Gtk::Entry.new entry.name = entry table.attach(entry, 1, 2, i, i + 1) @entries <<= entry end end @debuggers = @glade.("debuggers") make_debugger_combo(@debuggers) @window.show_all end |