Class: RETerm::Components::HSlider

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

Overview

Horizontal Slider, implemented using Slider 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 = {}) ⇒ HSlider

Initialize the HSlider component

Parameters:

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

    slider params

Options Hash (args):

  • :title (String)

    title of slider

  • :label (String)

    label of slider



12
13
14
15
16
17
18
# File 'lib/reterm/components/hslider.rb', line 12

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

  @increment     = 1
  @range         = [0, 100]
end