Sha256: de0ea2e0bb01dac6a41ea785f433aabc20d16b555ba0b319bf2ab35338f92dbe

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

require 'patchmaster/app/pm_window'

module PM
class ListWindow < PmWindow

  attr_reader :list

  def set_contents(title, list)
    @title, @list = title, list
    draw
  end

  def draw
    super
    return unless @list

    @list.each_with_index do |thing, i|
      @win.setpos(i+1, 1)
      @win.attron(A_REVERSE) if thing == @list.curr
      @win.addstr(make_fit(" #{thing.name} "))
      @win.attroff(A_REVERSE) if thing == @list.curr
    end
  end

end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
patchmaster-0.0.0 lib/patchmaster/app/list_window.rb