-
Notifications
You must be signed in to change notification settings - Fork 1
Textfield
GNamimates edited this page Oct 30, 2024
·
3 revisions
an element that allows the user to type in text.
Note
This element is very WIP. Expect alot of changes
Quick example on making a text field and typing something with it.
local GNUI = require"GNUI.main"
local TextField = require"GNUI.element.textField"
local screen = GNUI.getScreenCanvas()
local textField = TextField.new(screen)
textField.FIELD_CONFIRMED:register(function (field)
print("text confirmed: " .. field.textField)
end)| Type | Field | Description | |
|---|---|---|---|
string |
editingTextField | ... | |
boolean |
isEditing | ... | |
boolean |
isVertical | ... | |
integer |
pipePos | ... | |
string |
textField | ... |
| Event | Description |
|---|---|
FIELD_CHANGED |
... |
FIELD_CONFIRMED |
... |
| Returns | Methods |
|---|---|
GNUI.TextField |
TextField.new(parent : GNUI.Box?, variant : string|"none"|"default"?) |
self |
TextField:updateField() |
self |
TextField:setTextField(text : string) |
self |
TextField:appendTextField() |
self |
TextField:setEditing() |
| TextField:setToggle() |
-
GNUI.Box?parent -
string|"none"|"default"?variant
Updates the text being displayed in the text field. call this when modifying the fields without using the official APIs.
Sets the exact value of the text field.
-
stringtext
Appends a string onto the existing editing text field.
Sets the sate if the text field is being edited or not. setting this to false from true will confirm the text field