samp.directory
← Скрипты и библиотеки

by-not/not_android_menu

Touch-friendly clickable PlayerTextDraw menus (SelectMenu & EditMenu) for SA-MP Android/mobile and PC.

Библиотека★ 0обновлён вчераMITPawn
Открыть на GitHub
Попробовать в компиляторе Pawn →

Добавляет файлы инклудов этого репозитория вместе с библиотеками, от которых он зависит, в компилятор Pawn в вашем браузере, чтобы их можно было сразу подключить в скрипте.

README.md

not_android_menu

Language: English | Español

Touch-friendly clickable PlayerTextDraw menus for SA-MP and open.mp, tailored for Android / mobile clients (and fully usable on PC).

Included Menus

  • SelectMenu: Title, info text, <<< / >>> navigation buttons, and 2 action buttons.
  • EditMenu: Title, info text, live X / Y / Z coordinate display, X / Y / Z axis buttons, + / - buttons, and 4 action buttons.

Features

  • Lazy PlayerTextDraw creation (zero slots used when closed).
  • Zero external dependencies (requires only <a_samp>).
  • Optional callbacks dispatched via CallLocalFunction (works with or without YSI y_hooks).
  • Automatic cleanup on menu switch and OnPlayerDisconnect.

Installation

#include <a_samp>

#define COLOR_SELECT_TD 0xB878D8FF // Optional cursor highlight color
#include <not_android_menu>

Quick Start

ShowSelectMenu(playerid);
SetSelectMenuTitle(playerid, "Vehicle Shop");
SetSelectMenuInfo(playerid, "Infernus - $250,000");
SetSelectMenuButton1(playerid, "~g~~h~Buy");
SetSelectMenuButton2(playerid, "~r~~h~Exit");

public OnSelectMenuClick(playerid, buttonid, bool:cancelled)
{
    if(cancelled || buttonid == BTN_SELECT_2)
    {
        HideSelectMenu(playerid);
        return 1;
    }
    return 1;
}

License

Released under the MIT License.

androidgtasaopenmppawnsamptextdraw

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью

by-not/not_android_menu: Библиотека для SA-MP | samp.directory