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
  • Download example
  • Start
  • Let's look at a simple example
  • How does it work?
  1. Get started

Get started

PreviousHomeNextCallback event

Last updated 3 years ago

Download example

Download rblx file from DevForum

Start

Open LS Example

Let's look at a simple example

local PluginComponents= require(game.ReplicatedStorage.PluginComponents.PluginComponents);



local Container = PluginComponents.Component.Container.New();
Container.SetParent(script.Parent)
.SetHeight(0, 600)
.SetWidth(0,360)



local btnExample = PluginComponents.Component.Btn.New()
.SetParent(Container)
.SetText("Example")
.SetBackgroundColor(PluginComponents.Color.Blue)
.MouseButton1Click:Connect(function()
    print("Click!")
end)

Result:

How does it work?

We create a simple container, using a function:

PluginComponents.Component.Container.New()

Next, use a point to change the properties of the created object

Container.SetParent(script.Parent)

.SetHeight(0, 600)

.SetWidth(0,360)

In doing so, obtain an autocomplete after each point:

Logo[OPEN SOURCE] PluginComponent | Plug-in interface creation kitDevForum | Roblox