PluginComponent
  • Home
  • Get started
    • Get started
    • Callback event
    • BaseComponent
  • Components
    • Input
    • Jumbotron
    • Button
    • Container
  • AddProperties
    • Text
    • BackgroundColor
    • Padding
  • Extra functions
    • Validate
    • Color
  • Created with PluginComponent
Powered by GitBook
On this page
  • Create
  • Event
  • .Change:Connect(val, prevVal)
  • Methods
  • .Get
  • .Set(val)
  • .SetLabel(val)
  • .SetPlaceholder(val)
  • .ResetText()
  • .SetValidate()
  • Inherited from BaseComponent
  • Properties
  1. Components

Input

Create

local InputExapmle = PluginComponents.Component.Input.New()
.SetParent(Container)
.SetLabel("Npc login:")
.SetPlaceholder("Write login")
.Change:Connect(function(val, prevval)
    print(val, prevval)
end)

Event

.Change:Connect(val, prevVal)

Called each time a field value is changed. The VAL parameter returns the current value of the field. The prevVal argument returns the past value.

Methods

.Get

The value of the field is returned

.Set(val)

Changes the value of the field

.SetLabel(val)

Changes the label near the field. If there is one

.SetPlaceholder(val)

Changes the placeholder of an empty field

.ResetText()

Resets the value to an empty string

.SetValidate()

Changes the way the field is validated. The default method is specified:

PluginComponents.Validate.Any()

.SetValidate(PluginComponents.Validate.Any())

Подробнее:

Properties

PreviousBaseComponentNextJumbotron

Last updated 3 years ago

Inherited from

Validate
BaseComponent
BaseComponent