2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
43 INTERNAL_setHorizontalAlignment((
int)value);
58 INTERNAL_setVerticalAlignment((
int)value);
69 INTERNAL_getColor(out
Color value);
74 INTERNAL_setColor(ref value);
85 INTERNAL_getAnchor(out
Vector2 value);
90 INTERNAL_setAnchor(ref value);
101 INTERNAL_getSize(out
Vector2 value);
106 INTERNAL_setSize(ref value);
113 public bool hovered { [MethodImpl(MethodImplOptions.InternalCall)]
get; }
118 public Canvas canvas { [MethodImpl(MethodImplOptions.InternalCall)]
get; }
124 INTERNAL_getPosition(out
Vector3 value);
129 INTERNAL_setPosition(ref value);
137 INTERNAL_getRect(out
Rect value);
149 [MethodImpl(MethodImplOptions.InternalCall)]
150 private extern void INTERNAL_getColor(out
Color value);
152 [MethodImpl(MethodImplOptions.InternalCall)]
153 private extern void INTERNAL_setColor(ref
Color value);
155 [MethodImpl(MethodImplOptions.InternalCall)]
156 private extern void INTERNAL_getAnchor(out
Vector2 value);
158 [MethodImpl(MethodImplOptions.InternalCall)]
159 private extern void INTERNAL_setAnchor(ref
Vector2 value);
161 [MethodImpl(MethodImplOptions.InternalCall)]
162 private extern int INTERNAL_getHorizontalAlignment();
164 [MethodImpl(MethodImplOptions.InternalCall)]
165 private extern void INTERNAL_setHorizontalAlignment(
int value);
167 [MethodImpl(MethodImplOptions.InternalCall)]
168 private extern int INTERNAL_getVerticalAlignment();
170 [MethodImpl(MethodImplOptions.InternalCall)]
171 private extern void INTERNAL_setVerticalAlignment(
int value);
173 [MethodImpl(MethodImplOptions.InternalCall)]
174 private extern void INTERNAL_getSize(out
Vector2 value);
176 [MethodImpl(MethodImplOptions.InternalCall)]
177 private extern void INTERNAL_setSize(ref
Vector2 value);
179 [MethodImpl(MethodImplOptions.InternalCall)]
180 private extern void INTERNAL_getPosition(out
Vector3 value);
182 [MethodImpl(MethodImplOptions.InternalCall)]
183 private extern void INTERNAL_setPosition(ref
Vector3 value);
185 [MethodImpl(MethodImplOptions.InternalCall)]
186 private extern void INTERNAL_getRect(out
Rect value);
188 private void CallOnMouseDown(
UIElement sender,
int button,
Vector2 cursorPosition)
190 onMouseDown?.Invoke(sender, button, cursorPosition);
193 private void CallOnMouseUp(UIElement sender,
int button, Vector2 cursorPosition)
195 onMouseUp?.Invoke(sender, button, cursorPosition);
198 private void CallOnMouseMove(UIElement sender, Vector2 cursorPosition)
203 private void CallOnMouseEnter(UIElement sender, Vector2 cursorPosition)
208 private void CallOnMouseExit(UIElement sender, Vector2 cursorPosition)
MouseButtonEvent onMouseUp
object userData
Get or set the user data
CanvasVerticalAlignment
CanvasVerticalAlignment enum
Color color
Get or set the main color of this element
MouseMoveEvent onMouseExit
bool hovered
Returns if this element is hovered by mouse cursor
CanvasVerticalAlignment verticalAlignment
Get or set vertical alignment of this element
CanvasHorizontalAlignment
CanvasHorizontalAlignment enum
MouseMoveEvent onMouseEnter
delegate void MouseMoveEvent(UIElement sender, Vector2 cursorPosition)
Vector2 anchor
Get or set the anchor of this element (pivot point)
delegate void MouseButtonEvent(UIElement sender, int button, Vector2 cursorPosition)
CanvasHorizontalAlignment horizontalAlignment
Get or set horizontal alignment of this element
Vector2 size
Get or set the size of this element (width and height)
MouseMoveEvent onMouseMove
MouseButtonEvent onMouseDown
Canvas canvas
Returns a canvas of this element