Falco Engine 3.9.0.1 (beta)
TextInput.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 TextInput : UIElement
8 {
9 internal TextInput()
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
90 public enum TextHorizontalAlignment { Left, Center, Right };
91
95 public enum TextVerticalAlignment { Top, Middle, Bottom };
96
100 public string text { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
101
105 public Font font { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
106
110 public float fontSize { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }
111
116 {
117 get
118 {
119 return (TextHorizontalAlignment)INTERNAL_get_textHorizontalAlignment();
120 }
121 set
122 {
123 INTERNAL_set_textHorizontalAlignment((int)value);
124 }
125 }
126
131 {
132 get
133 {
134 return (TextVerticalAlignment)INTERNAL_get_textVerticalAlignment();
135 }
136 set
137 {
138 INTERNAL_set_textVerticalAlignment((int)value);
139 }
140 }
141
142 /*----------- INTERNAL CALLS ------------*/
143
144 [MethodImpl(MethodImplOptions.InternalCall)]
145 private extern void INTERNAL_getHoverStateColor(out Color value);
146
147 [MethodImpl(MethodImplOptions.InternalCall)]
148 private extern void INTERNAL_setHoverStateColor(ref Color value);
149
150 [MethodImpl(MethodImplOptions.InternalCall)]
151 private extern void INTERNAL_getActiveStateColor(out Color value);
152
153 [MethodImpl(MethodImplOptions.InternalCall)]
154 private extern void INTERNAL_setActiveStateColor(ref Color value);
155
156 [MethodImpl(MethodImplOptions.InternalCall)]
157 private extern void INTERNAL_getDisabledStateColor(out Color value);
158
159 [MethodImpl(MethodImplOptions.InternalCall)]
160 private extern void INTERNAL_setDisabledStateColor(ref Color value);
161
162 [MethodImpl(MethodImplOptions.InternalCall)]
163 private extern int INTERNAL_get_textHorizontalAlignment();
164
165 [MethodImpl(MethodImplOptions.InternalCall)]
166 private extern void INTERNAL_set_textHorizontalAlignment(int value);
167
168 [MethodImpl(MethodImplOptions.InternalCall)]
169 private extern int INTERNAL_get_textVerticalAlignment();
170
171 [MethodImpl(MethodImplOptions.InternalCall)]
172 private extern void INTERNAL_set_textVerticalAlignment(int value);
173 }
174}
TextHorizontalAlignment
TextHorizontalAlignment enum
Definition: TextInput.cs:90
bool interactable
Gets or sets the text input interactability (i.e. disable or enable this text input or get its state)
Definition: TextInput.cs:85
Texture disabledStateTexture
Returns the texture in the disabled state
Definition: TextInput.cs:32
Color hoverStateColor
Returns the color in the hover state (when the mouse cursor is above this text input)
Definition: TextInput.cs:38
TextVerticalAlignment textVerticalAlignment
Get or set text vertical alignment
Definition: TextInput.cs:131
Font font
Get or set the font
Definition: TextInput.cs:105
Color disabledStateColor
Returns the color in the disabled state
Definition: TextInput.cs:70
float fontSize
Get or set the font size
Definition: TextInput.cs:110
string text
Get or set the text
Definition: TextInput.cs:100
Texture hoverStateTexture
Returns the texture in the hover state (when the mouse cursor is above this text input)
Definition: TextInput.cs:22
TextVerticalAlignment
TextVerticalAlignment enum
Definition: TextInput.cs:95
Color activeStateColor
Returns the color in the active state (when the mouse is clicked and held down on this text input)
Definition: TextInput.cs:54
Texture normalStateTexture
Returns the texture in the normal state
Definition: TextInput.cs:17
Texture activeStateTexture
Returns the texture in the active state (when the mouse is clicked and held down on this text input)
Definition: TextInput.cs:27
TextHorizontalAlignment textHorizontalAlignment
Get or set text horizontal alignment
Definition: TextInput.cs:116