Basalt 1.7 Update
- New Objects (Flexbox, Graph, Treeview) - Pluginsystem to add/remove functionality - Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject - Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox - Removed the Animation Object, and added a animation plugin instead - Removed the Graphic Object and merged it's functionality with the image object - Updated currently existing objects
This commit is contained in:
@@ -1,12 +1,33 @@
|
||||
With input's you are able to create a object where the user can type something in.<br>
|
||||
Input objects allow you to create a field where the user can enter text.
|
||||
|
||||
[Object](objects/Object.md) methods also apply for input objects.
|
||||
In addition to the Object and VisualObject methods, Input objects have the following methods:
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|[setInputType](objects/Input/setInputType.md)|Sets the input type
|
||||
|[getInputType](objects/Input/getInputType.md)|Returns the input type
|
||||
|[setDefaultText](objects/Input/setDefaultText.md)|Sets the default text
|
||||
|[setInputLimit](objects/Input/setInputLimit.md)|Sets a limit to be able to write
|
||||
|[getInputLimit](objects/Input/getInputLimit.md)|Returns the limit
|
||||
|[setInputLimit](objects/Input/setInputLimit.md)|Sets a limit to the number of characters that can be entered
|
||||
|[getInputLimit](objects/Input/getInputLimit.md)|Returns the character limit
|
||||
|[setOffset](objects/Input/setOffset.md)|Changes the offset inside the input
|
||||
|[getOffset](objects/Input/getOffset.md)|Returns the input offset
|
||||
|[setTextOffset](objects/Input/setTextOffset.md)|Changes the cursor position
|
||||
|[getTextOffset](objects/Input/getTextOffset.md)|Returns the cursor position
|
||||
|
||||
Here's an example of how to create an Input object and set its properties:
|
||||
|
||||
Lua:
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local anInput = main:addInput()
|
||||
anInput:setInputType("text")
|
||||
anInput:setDefaultText("Username")
|
||||
anInput:setInputLimit(20)
|
||||
```
|
||||
|
||||
XML:
|
||||
|
||||
```xml
|
||||
<input type="text" defaultText="Username" inputLimit="20" />
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user