This is a library/plugin for Cleo Redux to create menus for script mods for the definitive editon of Grand theft Auto San Andreas. Its in early stages of development but still usable
1) Install [Cleo Redux](https://github.com/cleolibrary/CLEO-Redux) note that this requires cleo Redux version 0.9.0
2) Place the menu_system folder inside the CLEO folder which should be located inside win64 folder of game directory
The basics of creating a menu in your script is as follows.
import {Menu,MenuOption} from "./menu_system/menu"
//new Menu(name,options,width,posx,posy,menucolor)
//Initalizes the menu
let menu = new Menu("Simple Menu",["option1"], 150, -100, 0,[100, 200, 248,Math.round( 255)]);
//keycode for f4 key
const f4_key=115;
//game loop
while(true){
wait(0);
//menu toggle on press of f4 key
if (Pad.IsKeyPressed(f4_key)) {
while (Pad.IsKeyPressed(f4_key)) {
wait(0);
}
menu.setActive(!menu.isActive());
}
//if the menu is active, it draws the menu to screen
if(menu.isActive()){
menu.draw();
}
}
For more detailed example see examples. The documentation can be viewed at Docs
- Menu Background Color customization
- Setting Fonts for menu title and options
- Setting menu position width
- Setting max items in view
- Automatic height calculation based on number of options
- Setting highlight/hover color
- Setting option outline color and height
- Setting menu option background color
- Automatic scrolling generation
- Much more
The only requirement is that you mention me in the credit and link the download/release page https://github.com/yushaer/GTA-SADE-Menu-System/releases/tag/cleo_menu_plugin of my menu plugin rather then bundle my menu plugin files with your mod file