Method: RETerm::Components::Dial#initialize

Defined in:
lib/reterm/components/dial.rb

#initialize(args = {}) ⇒ Dial

Enapsulating window should be at least 4x4 for decent effect, at least 7x7 provides best resolution

Examples:

activating a dial

win  = Window.new
dial = Dial.new
win.component = dial

val = dial.activate!

Parameters:

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

    dial params



22
23
24
25
26
27
28
29
# File 'lib/reterm/components/dial.rb', line 22

def initialize(args={})
  super
  @initial_value = 0
  @increment     = 0.01
  @range         = [0, 1]
  @labels        = true
  @value = initial_value
end