Update README.md

This commit is contained in:
Arkadiy
2024-01-18 21:22:11 +02:00
committed by GitHub
parent 8cc8210f38
commit e9c65c5310

View File

@@ -1,3 +1,22 @@
![logo](https://github.com/MEFRREEX/FormConstructor-PM/assets/83061703/cdbd20c2-7046-4636-a6c7-6482beb51ecf)
This plugin is a rewritten version of the FormConstructor plugin for Nukkit on PocketMine-MP API 5.0.0
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
[![Version](https://img.shields.io/badge/Version-2.0.1-brightgreen)](https://github.com/MEFRREEX/FormConstructor-PM/releases/tag/1.0.0)
🤔 Introduction
-------------
Library is designed to simplify the creation and handling of forms.
It has a few key advantages over other form libraries:
- Forms are handled using a callback function that is passed in when the form itself is created.
- For each button in SimpleForm we can set a callback function.
- In SimpleForm we get a button object as a response, where we can get its name and index.
- In CustomForm we can mark elements with an identifier to conveniently get this element in its handler. We can get element by id and its index.
- For each form we can set its closing handler.
🛠 Examples 🛠 Examples
------------- -------------
@@ -111,4 +130,4 @@ public function onFormSend(PlayerFormSendEvent $event) {
// Getting the form // Getting the form
$form = $event->getForm(); $form = $event->getForm();
} }
``` ```