class Prism::GUIElement
- Prism::GUIElement
- Crash::Component
- Reference
- Object
Overview
Represents a single GUI element. GUIElements are 2d graphics drawn on the screen with a z-axis equal to 0.
Defined in:
prism/stdlib/gui_element.crConstructors
-
.new(texture : Prism::Texture2D, position : Prism::Maths::Vector2f, scale : Prism::Maths::Vector2f)
When setting the position remember that 0,0 is at the center of the screen.
Instance Method Summary
Constructor Detail
def self.new(texture : Prism::Texture2D, position : Prism::Maths::Vector2f, scale : Prism::Maths::Vector2f)
#
When setting the position remember that 0,0 is at the center of the screen. So the screen top left corner is -1, 1 while the bottom right corner is 1, -1 The position represents the center of the GUI texture. The scale represents the size of the GUI texture relative to the screen.