Class: RETerm::Components::SList

Inherits:
RETerm::Component show all
Includes:
RETerm::CDKComponent
Defined in:
lib/reterm/components/slist.rb

Overview

Scrolling List CDK Component

Instance Attribute Summary

Attributes inherited from RETerm::Component

#window

Instance Method Summary collapse

Methods included from RETerm::CDKComponent

#activatable?, #activate!, #colors=, #component, #draw!, #value

Methods inherited from RETerm::Component

#activatable?, #activate!, #colored?, #colors=, #finalize!

Constructor Details

#initialize(args = {}) ⇒ SList

Initialize the SList component

Parameters:

  • args (Hash) (defaults to: {})

    list params

Options Hash (args):

  • :title (String)

    title of list

  • :items (Array<String>)

    items to populate list with



13
14
15
16
# File 'lib/reterm/components/slist.rb', line 13

def initialize(args={})
  @title  = args[:title] || ""
  @items  = args[:items] || []
end