Method: MiniGL::ToggleButton#update

Defined in:
lib/minigl/forms.rb

#updateObject

Updates the button, checking the mouse movement and buttons to define the button state.



319
320
321
322
323
324
325
# File 'lib/minigl/forms.rb', line 319

def update
  return unless @enabled and @visible

  super
  @img_index *= 2
  @img_index += 1 if @checked
end