From e9c65c53104a83fcc8ba8d15f72dff5ec6e9edc2 Mon Sep 17 00:00:00 2001 From: Arkadiy <83061703+MEFRREEX@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:22:11 +0200 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 199f1ef..f9434a1 100644 --- a/README.md +++ b/README.md @@ -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 ------------- @@ -111,4 +130,4 @@ public function onFormSend(PlayerFormSendEvent $event) { // Getting the form $form = $event->getForm(); } -``` \ No newline at end of file +```