Falco Engine 3.9.0.1 (beta)
Button.cs
Go to the documentation of this file.
1using System;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5namespace FalcoEngine
6{
7 public class Button : UIElement
8 {
9 internal Button()
10 {
11
12 }
13
17 public Texture normalStateTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
18
22 public Texture hoverStateTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
23
27 public Texture activeStateTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
28
32 public Texture disabledStateTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
33
38 {
39 get
40 {
41 INTERNAL_getHoverStateColor(out Color value);
42 return value;
43 }
44 set
45 {
46 INTERNAL_setHoverStateColor(ref value);
47 }
48 }
49
54 {
55 get
56 {
57 INTERNAL_getActiveStateColor(out Color value);
58 return value;
59 }
60 set
61 {
62 INTERNAL_setActiveStateColor(ref value);
63 }
64 }
65
70 {
71 get
72 {
73 INTERNAL_getDisabledStateColor(out Color value);
74 return value;
75 }
76 set
77 {
78 INTERNAL_setDisabledStateColor(ref value);
79 }
80 }
81
85 public bool interactable { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
86
87 /*----------- INTERNAL CALLS ------------*/
88
89 [MethodImpl(MethodImplOptions.InternalCall)]
90 private extern void INTERNAL_getHoverStateColor(out Color value);
91
92 [MethodImpl(MethodImplOptions.InternalCall)]
93 private extern void INTERNAL_setHoverStateColor(ref Color value);
94
95 [MethodImpl(MethodImplOptions.InternalCall)]
96 private extern void INTERNAL_getActiveStateColor(out Color value);
97
98 [MethodImpl(MethodImplOptions.InternalCall)]
99 private extern void INTERNAL_setActiveStateColor(ref Color value);
100
101 [MethodImpl(MethodImplOptions.InternalCall)]
102 private extern void INTERNAL_getDisabledStateColor(out Color value);
103
104 [MethodImpl(MethodImplOptions.InternalCall)]
105 private extern void INTERNAL_setDisabledStateColor(ref Color value);
106 }
107}
Texture disabledStateTexture
Returns the texture in the disabled state
Definition: Button.cs:32
bool interactable
Gets or sets the button interactability (i.e. disable or enable this button or get its state)
Definition: Button.cs:85
Color activeStateColor
Returns the button color in the active state (when the mouse is clicked and held down on this button)
Definition: Button.cs:54
Color hoverStateColor
Returns the button color in the hover state (when the mouse cursor is above this button)
Definition: Button.cs:38
Color disabledStateColor
Returns the button color in the disabled state
Definition: Button.cs:70
Texture hoverStateTexture
Returns the texture in the hover state (when the mouse cursor is above this button)
Definition: Button.cs:22
Texture normalStateTexture
Returns the texture in the normal state
Definition: Button.cs:17
Texture activeStateTexture
Returns the texture in the active state (when the mouse is clicked and held down on this button)
Definition: Button.cs:27