lib/minigl/forms.rb
def update
      return unless @enabled and @visible
      if @open and Mouse.button_pressed? :left and not Mouse.over?(@x, @y, @w, @max_h)
        toggle
        return
      end
      @buttons.each { |b| b.update }
    end
def update
      return unless @enabled and @visible
      if @open and Mouse.button_pressed? :left and not Mouse.over?(@x, @y, @w, @max_h)
        toggle
        return
      end
      @buttons.each { |b| b.update }
    end
Creates a new drop-down list.

 Parameters:
 [x] The x-coordinate of the object.
 [y] The y-coordinate of the object.
 [font] Font to be used by the buttons that compose the drop-down list.
 [img] Image of the main button, i.e., the one at the top, that toggles
       visibility of the other buttons (the "option" buttons).
 [opt_img] Image for the "option" buttons, as described above.
 [options] Array of available options for this control (+String+s).
 [option] Index of the firstly selected option.
 [text_margin] Left margin of the text inside the buttons (vertically, the
               text will always be centered).
 [width] Width of the control, used when no image is provided.
 [height] Height of the control, used when no image is provided.
 [text_color] Used as the +text_color+ parameter in the constructor of the
              buttons.
 [disabled_text_color] Analogous to +text_color+.
 [over_text_color] Same as above.
 [down_text_color] Same as above.
 [retro] Whether the images should be loaded with the 'retro' option set
         (see +Gosu::Image+ for details). If the value is omitted, the
         +Res.retro_images+ value will be used.
 [scale_x] Horizontal scale to draw the component with.
 [scale_y] Vertical scale to draw the component with.
 [anchor] See parameter with the same name in <code>Panel#initialize</code> for details.
 [on_changed] Action performed when the value of the dropdown is changed.
              It must be a block with two parameters, which will receive
              the old and the new value, respectively.

 *Obs.:* This method accepts named parameters, but +x+, +y+, +font+ and
 +options+ are mandatory (also, +img+ and +opt_img+ are mandatory when
 +width+ and +height+ are not provided, and vice-versa).
 Updates the control.