rdoc/gosu.rb in gosu-0.11.3.1 vs rdoc/gosu.rb in gosu-0.11.4.pre1
- old
+ new
@@ -111,32 +111,32 @@
##
# @return [Integer] the color's blue channel.
attr_accessor :blue
##
- # @return [Integer] the color's hue in the range (0...360).
+ # @return [Float] the color's hue in the range [0.0; 360.0).
attr_accessor :hue
##
- # @return [Float] the color's saturation in the range (0..1).
+ # @return [Float] the color's saturation in the range [0.0; 1.0].
attr_accessor :saturation
##
- # @return [Float] the color's value in the range (0..1).
+ # @return [Float] the color's value in the range [0.0; 1.0].
attr_accessor :value
# @!group Creating colors.
##
# @overload initialize(argb)
# @param argb [Integer] an integer of the form 0xAARRGGBB.
#
# @overload initialize(a, r, g, b)
- # @param a [Integer] the color's alpha channel in the range (0..255).
- # @param r [Integer] the color's red channel in the range (0..255).
- # @param g [Integer] the color's green channel in the range (0..255).
- # @param b [Integer] the color's blue channel in the range (0..255).
+ # @param a [Integer] the color's alpha channel in the range [0; 255].
+ # @param r [Integer] the color's red channel in the range [0; 255].
+ # @param g [Integer] the color's green channel in the range [0; 255].
+ # @param b [Integer] the color's blue channel in the range [0; 255].
#
# @see from_hsv
# @see from_ahsv
# @see rgba
# @see argb
@@ -147,14 +147,14 @@
#
# @overload rgba(rgba)
# @param argb [Integer] an integer of the form 0xRRGGBBAA.
#
# @overload rgba(r, g, b, a)
- # @param r [Integer] the color's red channel in the range (0..255).
- # @param g [Integer] the color's green channel in the range (0..255).
- # @param b [Integer] the color's blue channel in the range (0..255).
- # @param a [Integer] the color's alpha channel in the range (0..255).
+ # @param a [Integer] the color's alpha channel in the range [0; 255].
+ # @param r [Integer] the color's red channel in the range [0; 255].
+ # @param g [Integer] the color's green channel in the range [0; 255].
+ # @param b [Integer] the color's blue channel in the range [0; 255].
#
# @see #initialize
# @see argb
def self.rgba(*args); end
@@ -169,21 +169,21 @@
def self.argb(*args); end
# Converts an HSV triplet to an opaque color.
#
# @return [Color] a color corresponding to the HSV triplet.
- # @param h [Integer] the color's hue in the range (0..360).
- # @param s [Float] the color's saturation in the range (0..1).
- # @param v [Float] the color's value in the range (0..1).
+ # @param h [Float] the color's hue in the range [0.0; 360.0).
+ # @param s [Float] the color's saturation in the range [0.0; 1.0].
+ # @param v [Float] the color's value in the range [0.0; 1.0].
#
# @see from_ahsv
def self.from_hsv(h, s, v); end
# Converts an HSV triplet to a color with the alpha channel set to a given value.
#
# @return (see from_hsv)
- # @param a [Integer] the color's opacity in the range (0..255).
+ # @param a [Integer] the color's opacity in the range [0; 255].
# @param (see from_hsv)
#
# @see from_hsv
def self.from_ahsv(a, h, s, v); end
@@ -514,11 +514,11 @@
# Plays the sample without panning.
#
# Playback speed is limited only by the underlying audio library, and both very large and very small values should work just fine.
#
# @return [SampleInstance]
- # @param volume [Float] the playback volume, in the range (0..1), where 0 is completely silent and 1 is full volume.
+ # @param volume [Float] the playback volume, in the range [0.0; 1.0], where 0 is completely silent and 1 is full volume.
# @param speed [Float] the playback speed.
# @param looping [true, false] whether the sample should play in a loop.
#
# @see #play_pan
def play(volume=1, speed=1, looping=false); end
@@ -527,11 +527,11 @@
# Plays the sample with panning.
#
# @note Samples played with this method will not be as loud as those played with {#play}, even if `pan` is 0. This is due to a limitation in the way panning works.
#
# @return [SampleInstance]
- # @param pan [Float] the amount of panning. 0 is centered.
+ # @param pan [Float] the amount of panning. 0.0 is centered.
# @param (see #play)
#
# @see #play
def play_pan(pan=0, volume=1, speed=1, looping=false); end
end
@@ -812,11 +812,11 @@
def close; end
##
# This method is called before {#update} if a button is pressed while the window has focus.
#
- # By default, this method will toggle fullscreen mode if the user presses alt+enter (Windows,
+ # By default, this method will toggle fullscreen mode if the user presses Alt+Enter (Windows,
# Linux) or cmd+F (macOS).
# To support these shortcuts in your application, make sure to call super in your
# implementation.
#
# @return [void]
@@ -834,10 +834,16 @@
#
# @see #button_down
# @see Gosu.button_down?
def button_up(id); end
+ ##
+ # Called when a file is dropped onto the window.
+ #
+ # @param filename [String] the filename of the dropped file. When multiple files are dropped, this method will be called several times.
+ def drop(filename); end
+
# @!endgroup
end
##
# Holds information about the underlying OpenGL texture and UV coordinates of an image.
@@ -1129,10 +1135,10 @@
# @see Window#text_input
# @see TextInput
def self.char_to_button_id(char); end
##
- # @return [Float] a random number in the range (min...max).
+ # @return [Float] a random number in the range [min; max).
# @param min [Float] the minimum value, inclusive.
# @param max [Float] the maximum value, exclusive.
def random(min, max); end
##