module Engine

Extended Modules

Defined in:

engine/engine.cr
engine/gui.cr
engine/physics.cr
engine/shaders.cr

Constant Summary

DEFAULT_BTN_FONT = Font.new(FontResource.new(0), dont_create: true)
DELETED_TEXTURE = (-1).unsafe_as(LibEngine::Sprite)
DELETED_VERTEX_LIST = (-1).unsafe_as(LibEngine::VertexList)

fun vertex_list_add_field = VertexListAddField(list : VertexList, field : ShaderAttribute) fun vertex_list_add_padding = VertexListAddPadding(list : VertexList, n_bytes : Int32) fun vertex_list_copy = VertexListCopy(list : VertexList) : VertexList fun vertex_list_change = VertexListChange(list : VertexList, buffer : Void*, typ : VertexListPrimitive, n_vertices : Int32)

LAYER_GUI = 100
TYPES_MAPPING = {"vec2" => "Vec2", "vec3" => "Vec3", "vec4" => "Vec4", "float" => "Float32", "sampler2D" => "Sprite", "int" => "Int32"}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.[](param : Params) #

[View source]
def self.[]=(param : Params, value) #

[View source]
def self.init(dir) #

[View source]
def self.layer=(value) #

[View source]
def self.screen_box #

[View source]
def self.screen_size #

[View source]

Instance Method Detail

def button(resource : ButtonResource, x = 0, y = 0, width = 0, height = 0, text : String | Nil = nil, halign : HAlign = HAlign::None, valign : VAlign = VAlign::None, font : Font | FontResource | Nil = nil) #

[View source]
def button(*args, **args2, &) #

[View source]
def button_clicked(*args, **args2, &) #

[View source]
def camera(offset = v2(0, 0), scale = v2(1, 1), angle = 0) #

[View source]
def circle(center, r, filled, color1, color2 = color1) #

[View source]
def color(r : Int32, g : Int32, b : Int32, a : Int32 = 255) : Engine::Color #

[View source]
def color(u : UInt32) : Engine::Color #

[View source]
def edit(value : Int32, min : Int32, max : Int32, font : Font, x = 0, y = 0, width = 0, height = 0, halign = HAlign::None, valign = VAlign::None, fill : Color | Nil = nil, border : Color | Nil = nil, *, allow_scroll = false) : Int32 | Nil #

[View source]
def ellipse(center, radius, filled, color1, color2 = color1, angle = 0) #

[View source]
def label(txt : String, font : Font, x = 0, y = 0, width = 0, height = 0, halign = HAlign::None, valign = VAlign::None, fill : Color | Nil = nil, border : Color | Nil = nil, text_halign = HAlign::None, text_valign = VAlign::None) #

[View source]
def line(p1, p2, color1, color2 = color1) #

[View source]
def line_settings(width = 1, stipple = 4294967295_i64, stipple_scale = 1) #

[View source]
def log(s) #

[View source]
def panel(x = 0, y = 0, width = 0, height = 0, halign = HAlign::None, valign = VAlign::None, fill : Color | Nil = nil, border : Color | Nil = nil, root : Bool = false, &) #

[View source]
def panel(*args, **args2) #

[View source]
def point(pos : Vector2, color) #

[View source]
def process #

[View source]
def rect(box, filled, color1, color2, color3, color4, angle = 0) #

[View source]
def rect(box, filled, color, angle = 0) #

[View source]
def rect_gauge(box, value, color1, color2, angle = 0) #

[View source]
def triangle(p1 : Vector2, color1, p2 : Vector2, color2, p3 : Vector2, color3) #

[View source]
def triangle(p1 : Vector2, p2 : Vector2, p3 : Vector2, color) #

[View source]
def vec2(x : Float32, y : Float32) #

[View source]
def vec3(x : Float32, y : Float32, z : Float32) #

[View source]
def vec4(x : Float32, y : Float32, z : Float32, w : Float32) #

[View source]