Module: Gosu
- Defined in:
- reference/gosu.rb
Defined Under Namespace
Classes: Color, Font, GLTexInfo, Image, Sample, SampleInstance, Song, TextInput, Window
Constant Summary
- Kb0 =
:implementation_defined- Kb1 =
:implementation_defined- Kb2 =
:implementation_defined- Kb3 =
:implementation_defined- Kb4 =
:implementation_defined- Kb5 =
:implementation_defined- Kb6 =
:implementation_defined- Kb7 =
:implementation_defined- Kb8 =
:implementation_defined- Kb9 =
:implementation_defined- KbA =
:implementation_defined- KbB =
:implementation_defined- KbC =
:implementation_defined- KbD =
:implementation_defined- KbE =
:implementation_defined- KbF =
:implementation_defined- KbG =
:implementation_defined- KbH =
:implementation_defined- KbI =
:implementation_defined- KbJ =
:implementation_defined- KbK =
:implementation_defined- KbL =
:implementation_defined- KbM =
:implementation_defined- KbN =
:implementation_defined- KbO =
:implementation_defined- KbP =
:implementation_defined- KbQ =
:implementation_defined- KbR =
:implementation_defined- KbS =
:implementation_defined- KbT =
:implementation_defined- KbU =
:implementation_defined- KbV =
:implementation_defined- KbW =
:implementation_defined- KbX =
:implementation_defined- KbY =
:implementation_defined- KbZ =
:implementation_defined- KbBackspace =
:implementation_defined- KbDelete =
:implementation_defined- KbDown =
:implementation_defined- KbEnd =
:implementation_defined- KbEnter =
On Numpad
:implementation_defined- KbEscape =
:implementation_defined- KbF1 =
:implementation_defined- KbF10 =
:implementation_defined- KbF11 =
:implementation_defined- KbF12 =
:implementation_defined- KbF2 =
:implementation_defined- KbF3 =
:implementation_defined- KbF4 =
:implementation_defined- KbF5 =
:implementation_defined- KbF6 =
:implementation_defined- KbF7 =
:implementation_defined- KbF8 =
:implementation_defined- KbF9 =
:implementation_defined- KbHome =
:implementation_defined- KbInsert =
:implementation_defined- KbLeft =
:implementation_defined- KbLeftAlt =
:implementation_defined- KbLeftControl =
:implementation_defined- KbLeftShift =
:implementation_defined- KbNumpad0 =
:implementation_defined- KbNumpad1 =
:implementation_defined- KbNumpad2 =
:implementation_defined- KbNumpad3 =
:implementation_defined- KbNumpad4 =
:implementation_defined- KbNumpad5 =
:implementation_defined- KbNumpad6 =
:implementation_defined- KbNumpad7 =
:implementation_defined- KbNumpad8 =
:implementation_defined- KbNumpad9 =
:implementation_defined- KbNumpadAdd =
:implementation_defined- KbNumpadDivide =
:implementation_defined- KbNumpadMultiply =
:implementation_defined- KbNumpadSubtract =
:implementation_defined- KbPageDown =
:implementation_defined- KbPageUp =
:implementation_defined- KbReturn =
Above the right shift key
:implementation_defined- KbRight =
:implementation_defined- KbRightAlt =
:implementation_defined- KbRightControl =
:implementation_defined- KbRightShift =
:implementation_defined- KbSpace =
:implementation_defined- KbTab =
:implementation_defined- KbUp =
:implementation_defined- KbBacktick =
:implementation_defined- KbMinus =
:implementation_defined- KbEqual =
:implementation_defined- KbBracketLeft =
:implementation_defined- KbBracketRight =
:implementation_defined- KbBackslash =
:implementation_defined- KbSemicolon =
:implementation_defined- KbApostrophe =
:implementation_defined- KbComma =
:implementation_defined- KbPeriod =
:implementation_defined- KbSlash =
:implementation_defined- MsLeft =
:implementation_defined- MsMiddle =
:implementation_defined- MsRight =
:implementation_defined- MsWheelDown =
:implementation_defined- MsWheelUp =
:implementation_defined- MsOther0 =
:implementation_defined- MsOther1 =
:implementation_defined- MsOther2 =
:implementation_defined- MsOther3 =
:implementation_defined- MsOther4 =
:implementation_defined- MsOther5 =
:implementation_defined- MsOther6 =
:implementation_defined- MsOther7 =
:implementation_defined- GpButton0 =
:implementation_defined- GpButton1 =
:implementation_defined- GpButton10 =
:implementation_defined- GpButton11 =
:implementation_defined- GpButton12 =
:implementation_defined- GpButton13 =
:implementation_defined- GpButton14 =
:implementation_defined- GpButton15 =
:implementation_defined- GpButton2 =
:implementation_defined- GpButton3 =
:implementation_defined- GpButton4 =
:implementation_defined- GpButton5 =
:implementation_defined- GpButton6 =
:implementation_defined- GpButton7 =
:implementation_defined- GpButton8 =
:implementation_defined- GpButton9 =
:implementation_defined- GpDown =
:implementation_defined- GpLeft =
:implementation_defined- GpRight =
:implementation_defined- GpUp =
:implementation_defined- Gp0Button0 =
:implementation_defined- Gp0Button1 =
:implementation_defined- Gp0Button10 =
:implementation_defined- Gp0Button11 =
:implementation_defined- Gp0Button12 =
:implementation_defined- Gp0Button13 =
:implementation_defined- Gp0Button14 =
:implementation_defined- Gp0Button15 =
:implementation_defined- Gp0Button2 =
:implementation_defined- Gp0Button3 =
:implementation_defined- Gp0Button4 =
:implementation_defined- Gp0Button5 =
:implementation_defined- Gp0Button6 =
:implementation_defined- Gp0Button7 =
:implementation_defined- Gp0Button8 =
:implementation_defined- Gp0Button9 =
:implementation_defined- Gp0Down =
:implementation_defined- Gp0Left =
:implementation_defined- Gp0Right =
:implementation_defined- Gp0Up =
:implementation_defined- Gp1Button0 =
:implementation_defined- Gp1Button1 =
:implementation_defined- Gp1Button10 =
:implementation_defined- Gp1Button11 =
:implementation_defined- Gp1Button12 =
:implementation_defined- Gp1Button13 =
:implementation_defined- Gp1Button14 =
:implementation_defined- Gp1Button15 =
:implementation_defined- Gp1Button2 =
:implementation_defined- Gp1Button3 =
:implementation_defined- Gp1Button4 =
:implementation_defined- Gp1Button5 =
:implementation_defined- Gp1Button6 =
:implementation_defined- Gp1Button7 =
:implementation_defined- Gp1Button8 =
:implementation_defined- Gp1Button9 =
:implementation_defined- Gp1Down =
:implementation_defined- Gp1Left =
:implementation_defined- Gp1Right =
:implementation_defined- Gp1Up =
:implementation_defined- Gp2Button0 =
:implementation_defined- Gp2Button1 =
:implementation_defined- Gp2Button10 =
:implementation_defined- Gp2Button11 =
:implementation_defined- Gp2Button12 =
:implementation_defined- Gp2Button13 =
:implementation_defined- Gp2Button14 =
:implementation_defined- Gp2Button15 =
:implementation_defined- Gp2Button2 =
:implementation_defined- Gp2Button3 =
:implementation_defined- Gp2Button4 =
:implementation_defined- Gp2Button5 =
:implementation_defined- Gp2Button6 =
:implementation_defined- Gp2Button7 =
:implementation_defined- Gp2Button8 =
:implementation_defined- Gp2Button9 =
:implementation_defined- Gp2Down =
:implementation_defined- Gp2Left =
:implementation_defined- Gp2Right =
:implementation_defined- Gp2Up =
:implementation_defined- Gp3Button0 =
:implementation_defined- Gp3Button1 =
:implementation_defined- Gp3Button10 =
:implementation_defined- Gp3Button11 =
:implementation_defined- Gp3Button12 =
:implementation_defined- Gp3Button13 =
:implementation_defined- Gp3Button14 =
:implementation_defined- Gp3Button15 =
:implementation_defined- Gp3Button2 =
:implementation_defined- Gp3Button3 =
:implementation_defined- Gp3Button4 =
:implementation_defined- Gp3Button5 =
:implementation_defined- Gp3Button6 =
:implementation_defined- Gp3Button7 =
:implementation_defined- Gp3Button8 =
:implementation_defined- Gp3Button9 =
:implementation_defined- Gp3Down =
:implementation_defined- Gp3Left =
:implementation_defined- Gp3Right =
:implementation_defined- Gp3Up =
:implementation_defined
Instance Method Summary (collapse)
-
- (Object) angle(x1, y1, x2, y2)
Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards.
-
- (Object) angle_diff(angle1, angle2)
Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter).
-
- (Object) default_font_name
Returns the name of a neutral font that is available on the current platform.
-
- (Object) distance(x1, y1, x2, y2)
Returns the distance between two points.
-
- (Object) language
Returns the user’s preferred language, at the moment of calling the function.
-
- (Object) milliseconds
Incrementing, possibly wrapping millisecond timer.
-
- (Object) offset_x(angle, dist)
Returns the horizontal distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
-
- (Object) offset_y(angle, dist)
Returns the vertical distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
-
- (Object) random(min, max)
Returns a random double between min (inclusive) and max (exclusive).
-
- (Object) screen_height
Returns the height, in pixels, of the user’s primary screen.
-
- (Object) screen_width
Returns the width, in pixels, of the user’s primary screen.
Instance Method Details
- (Object) angle(x1, y1, x2, y2)
Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
652 |
# File 'reference/gosu.rb', line 652 def angle(x1, y1, x2, y2) end |
- (Object) angle_diff(angle1, angle2)
Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter).
655 |
# File 'reference/gosu.rb', line 655 def angle_diff(angle1, angle2) end |
- (Object) default_font_name
Returns the name of a neutral font that is available on the current platform.
665 |
# File 'reference/gosu.rb', line 665 def default_font_name(); end |
- (Object) distance(x1, y1, x2, y2)
Returns the distance between two points.
658 |
# File 'reference/gosu.rb', line 658 def distance(x1, y1, x2, y2) end |
- (Object) language
Returns the user’s preferred language, at the moment of calling the function. Expect return values such as ‘en_US’, ‘de_DE.UTF-8’, ‘ja’, ‘zh-Hans’. You can rely only on the first two letters being a common language abbreviation.
676 |
# File 'reference/gosu.rb', line 676 def language(); end |
- (Object) milliseconds
Incrementing, possibly wrapping millisecond timer.
661 |
# File 'reference/gosu.rb', line 661 def milliseconds(); end |
- (Object) offset_x(angle, dist)
Returns the horizontal distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
646 |
# File 'reference/gosu.rb', line 646 def offset_x(angle, dist) end |
- (Object) offset_y(angle, dist)
Returns the vertical distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle.
649 |
# File 'reference/gosu.rb', line 649 def offset_y(angle, dist) end |
- (Object) random(min, max)
Returns a random double between min (inclusive) and max (exclusive).
643 |
# File 'reference/gosu.rb', line 643 def random(min, max) end |
- (Object) screen_height
Returns the height, in pixels, of the user’s primary screen.
671 |
# File 'reference/gosu.rb', line 671 def screen_height(); end |
- (Object) screen_width
Returns the width, in pixels, of the user’s primary screen.
668 |
# File 'reference/gosu.rb', line 668 def screen_width(); end |