Class: Raylib::Color

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib_main.rb

Class Method Summary collapse

Class Method Details

.from_u8(r = 0, g = 0, b = 0, a = 255) ⇒ Object

Color helper



46
47
48
49
50
51
52
53
# File 'lib/raylib.rb', line 46

def Color.from_u8(r = 0, g = 0, b = 0, a = 255)
  instance = Color.new
  instance[:r] = r
  instance[:g] = g
  instance[:b] = b
  instance[:a] = a
  return instance
end