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.



512
513
514
515
516
517
518
# File 'lib/minigl/forms.rb', line 512

def update
  return unless @enabled and @visible

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