Method: CDK::FSCALE#drawField

Defined in:
lib/cdk/components/fscale.rb

#drawFieldObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cdk/components/fscale.rb', line 12

def drawField
  @field_win.werase

  # Draw the value in the field.
  digits = [@digits, 30].min
  format = '%%.%if' % [digits]
  temp = format % [@current]
  
  Draw.writeCharAttrib(@field_win,
      @field_width - temp.size - 1, 0, temp, @field_attr,
      CDK::HORIZONTAL, 0, temp.size)

  self.moveToEditPosition(@field_edit)
  wrefresh(@field_win)
end