summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib')
-rw-r--r--mrblib/raylib.rb2
-rw-r--r--mrblib/texture.rb23
2 files changed, 24 insertions, 1 deletions
diff --git a/mrblib/raylib.rb b/mrblib/raylib.rb
index 0e60abf..41249be 100644
--- a/mrblib/raylib.rb
+++ b/mrblib/raylib.rb
@@ -64,7 +64,7 @@ module Raylib
end
def draw_texture(texture:, x:, y:, tint: Rl::Color.new(255,255,255,255))
- self._draw_texture(texture, x, y, tint)
+ texture.draw(x, y, tint)
end
def draw_texture_ex(texture:, pos:, rotation: 0, scale: 1, tint: Rl::Color.new(255,255,255,255))
diff --git a/mrblib/texture.rb b/mrblib/texture.rb
new file mode 100644
index 0000000..4b5dea7
--- /dev/null
+++ b/mrblib/texture.rb
@@ -0,0 +1,23 @@
+module Raylib
+ class Texture
+ # @!visibility private
+ def h
+ self.height
+ end
+
+ # @!visibility private
+ def h=(height)
+ self.height = height
+ end
+
+ # @!visibility private
+ def w
+ self.width
+ end
+
+ # @!visibility private
+ def w=(width)
+ self.width = width
+ end
+ end
+end