From 140faf8a4d0a86a848294da39ba7b504f073033f Mon Sep 17 00:00:00 2001 From: arngo <27396817+arngo@users.noreply.github.com> Date: Sun, 23 Jan 2022 02:09:42 -0500 Subject: bindings for DrawRectangleRec, DrawRectangleLinesEx, GetCollideRec under Rectangle class --- mrblib/raylib.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mrblib') diff --git a/mrblib/raylib.rb b/mrblib/raylib.rb index e3c99cb..1b0dfda 100644 --- a/mrblib/raylib.rb +++ b/mrblib/raylib.rb @@ -1,6 +1,16 @@ Rl = Raylib module Raylib + class Rectangle + def draw(color: Rl::Color.new(255,255,255,255)) + self._draw(color) + end + + def draw_lines(line_thick: 1, color: Rl::Color.new(255,255,255,255)) + self._draw_lines(line_thick, color) + end + end + class Circle attr_accessor :vector attr_accessor :radius @@ -60,8 +70,8 @@ module Raylib self._draw_texture_ex(texture, pos, rotation, scale, tint) end - def draw_texture_pro(texture:, source_rect:, dest_rect:, origin: Rl::Vector.new(0,0), rotation: 0, tint: Rl::Color.new(255,255,255,255)) - self._draw_texture_pro(texture, source_rect, dest_rect, origin, rotation, tint) + def draw_texture_pro(texture:, source_rec:, dest_rec:, origin: Rl::Vector.new(0,0), rotation: 0, tint: Rl::Color.new(255,255,255,255)) + self._draw_texture_pro(texture, source_rec, dest_rec, origin, rotation, tint) end def keys_pressed -- cgit v1.2.3