-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,025 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Rl | ||
module Draw | ||
# @!method clear | ||
# Set background color (framebuffer clear color) | ||
# @param color [Color] | ||
# @return [void] | ||
# @!method begin | ||
# Setup canvas (framebuffer) to start drawing | ||
# This method must be used with a block. The drawing commands should be placed inside the block. | ||
# The block ensures that drawing is correctly finalized with EndDrawing. | ||
# @yield The drawing commands to be executed. | ||
# @return [void] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
module Rl | ||
module Ease | ||
# @!method linear | ||
# Linear easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method sine | ||
# Sine easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method circ | ||
# Circular easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method cubic | ||
# Cubic easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method quad | ||
# Quadratic easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method expo | ||
# Exponential easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method back | ||
# Back easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method bounce | ||
# Bounce easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
# @!method elastic | ||
# Elastic easing types :in, :out, :inout | ||
# @param ease_type [Symbol] | ||
# @param time [Float] | ||
# @param start_value [Float] | ||
# @param change_value [Float] | ||
# @param duration [Float] | ||
# @return [Float] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
module Rl | ||
# Input-related functions: gamepads | ||
module Gamepad | ||
# @!attribute BUTTON_UNKNOWN | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_FACE_UP | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_FACE_RIGHT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_FACE_DOWN | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_FACE_LEFT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_FACE_UP | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_FACE_RIGHT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_FACE_DOWN | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_FACE_LEFT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_TRIGGER_1 | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_TRIGGER_2 | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_TRIGGER_1 | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_TRIGGER_2 | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_MIDDLE_LEFT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_MIDDLE | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_MIDDLE_RIGHT | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_LEFT_THUMB | ||
# Gamepad buttons | ||
# return [Integer] | ||
# @!attribute BUTTON_RIGHT_THUMB | ||
# Gamepad buttons | ||
# return [Integer] | ||
|
||
# @!attribute AXIS_LEFT_X | ||
# Gamepad axis | ||
# return [Integer] | ||
# @!attribute AXIS_LEFT_Y | ||
# Gamepad axis | ||
# return [Integer] | ||
# @!attribute AXIS_RIGHT_X | ||
# Gamepad axis | ||
# return [Integer] | ||
# @!attribute AXIS_RIGHT_Y | ||
# Gamepad axis | ||
# return [Integer] | ||
# @!attribute AXIS_LEFT_TRIGGER | ||
# Gamepad axis | ||
# return [Integer] | ||
# @!attribute AXIS_RIGHT_TRIGGER | ||
# Gamepad axis | ||
# return [Integer] | ||
|
||
# @!method available? | ||
# Check if a gamepad is available | ||
# @param gamepad [Integer] | ||
# @return [Boolean] | ||
# @!method name | ||
# Get gamepad internal name id | ||
# @param gamepad [Integer] | ||
# @return [String] | ||
# @!method button_pressed? | ||
# Check if a gamepad button has been pressed once | ||
# @param gamepad [Integer] | ||
# @param button [Integer] | ||
# @return [Boolean] | ||
# @!method button_down? | ||
# Check if a gamepad button is being pressed | ||
# @param gamepad [Integer] | ||
# @param button [Integer] | ||
# @return [Boolean] | ||
# @!method button_released? | ||
# Check if a gamepad button has been released once | ||
# @param gamepad [Integer] | ||
# @param button [Integer] | ||
# @return [Boolean] | ||
# @!method button_up? | ||
# Check if a gamepad button is NOT being pressed | ||
# @param gamepad [Integer] | ||
# @param button [Integer] | ||
# @return [Boolean] | ||
# @!method button_pressed | ||
# Get the last gamepad button pressed | ||
# @return [Integer] | ||
# @!method axis_count | ||
# Get gamepad axis count for a gamepad | ||
# @param gamepad [Integer] | ||
# @return [Integer] | ||
# @!method axis_movement | ||
# Get axis movement value for a gamepad axis | ||
# @param gamepad [Integer] | ||
# @param axis [Integer] | ||
# @return [Float] | ||
# @!method mappings= | ||
# Set internal gamepad mappings (SDL_GameControllerDB) | ||
# @param mappings [String] | ||
# @return [Integer] | ||
# @!method vibration= | ||
# Set gamepad vibration for both motors | ||
# @param gamepad [Integer] | ||
# @param left_motor [Float] | ||
# @param right_motor [Float] | ||
# @return [void] | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Rl | ||
# Gestures and Touch Handling Functions (Module: rgestures) | ||
module Gestures | ||
# @!method enabled= | ||
# Enable a set of gestures using flags | ||
# @param flags [Integer] | ||
# @return [void] | ||
# @!method detected? | ||
# Check if a gesture have been detected | ||
# @param gesture [Integer] | ||
# @return [Boolean] | ||
# @!method detected | ||
# Get latest detected gesture | ||
# @return [Integer] | ||
# @!method hold_duration | ||
# Get gesture hold time in milliseconds | ||
# @return [Float] | ||
# @!method drag_vector | ||
# Get gesture drag vector | ||
# @return [Vec2] | ||
# @!method drag_angle | ||
# Get gesture drag angle | ||
# @return [Float] | ||
# @!method pinch_vector | ||
# Get gesture pinch delta | ||
# @return [Vec2] | ||
# @!method pinch_angle | ||
# Get gesture pinch angle | ||
# @return [Float] | ||
end | ||
end | ||
|
Oops, something went wrong.