{"id":17706791,"url":"https://github.com/httpRick/SA-Menu","last_synced_at":"2025-03-13T11:31:13.378Z","repository":{"id":205161588,"uuid":"208142682","full_name":"httpRick/SA-Menu","owner":"httpRick","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-24T22:10:04.000Z","size":2021,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-11-02T20:29:56.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/httpRick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-09-12T20:41:03.000Z","updated_at":"2023-11-02T20:29:58.862Z","dependencies_parsed_at":null,"dependency_job_id":"c2603243-03da-48a9-9bdf-66f337c394fe","html_url":"https://github.com/httpRick/SA-Menu","commit_stats":null,"previous_names":["httprick/sa-menu"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpRick%2FSA-Menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpRick%2FSA-Menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpRick%2FSA-Menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpRick%2FSA-Menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httpRick","download_url":"https://codeload.github.com/httpRick/SA-Menu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221364439,"owners_count":16805894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T00:03:11.560Z","updated_at":"2024-10-25T00:05:46.246Z","avatar_url":"https://github.com/httpRick.png","language":"Lua","funding_links":[],"categories":["Libs and utils"],"sub_categories":[],"readme":"# San Andreas Menu (SA-MENU)\n\n\n### Screen:\n[![Actions Status](https://github.com/httpRick/SA-Menu/blob/master/screen.svg)](https://github.com/github/SA-Menu/actions)\n\n## Client Functions\n\n### createMenu\nParamters:\n* float position X\n* float position Y\n* string title Menu\n* strint type Menu 'default or shop' is the default mode is automatically selected\nreturns the created Menu\n\n```lua\ncreateMenu(85, 350, \"Example Menu\")\n```\n\n### createItem\nParamters:\n* element Menu\n* string left Item\n* string right Item\nreturns the created Menu item\n\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\ncreateItem(theMenu, \"Left item\", \"Right item\")\n```\n\n### destroyMenu\nParamters:\n* element Menu\nreturns true if the item is destroyed returns false if no item is found\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\ndestroyMenu(theMenu)\n```\n\n### showMenu\nParamters:\n* element Menu\nreturns true if the item is destroyed returns false if no item is found\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\nshowMenu(theMenu)\n```\n\n### hiddenMenu\nParamters:\n* element Menu\nreturns true if the item is destroyed returns false if no item is found\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\nhiddenMenu(theMenu)\n```\n\n### setMenuType\nParamters:\n* element Menu\n* string Menu type\nAvailable menu types are: \"default\", \"shop\"\nreturns true if a good type is input, otherwise false\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\nsetTypeMenu(theMenu, \"shop\")\n```\n### setMenuColumn\nParamters:\n* element Menu\n* string left column\n* string right column\n\n🔴 Only for the store type\n```lua\nlocal theMenu = createMenu(85, 350, \"Example Menu\")\nsetTypeMenu(theMenu, \"shop\")\nsetMenuColumn(theMenu, \"Products\", \"Price\")\n```\n\n\n\n\n## Clientside event\n\n### onClientMenuSelect\nParamters:\n* string Item1\n* string Item2\n\nreturns the item that has been selected\n\n```lua\nfunction exampleSelect(theItem1, theItem2)\n    print(theItem1, theItem2, \"select this item\")\nend\naddEventHandler(\"onClientMenuSelect\", theItem, exampleSelect)\n```\n\n### onClientMenuExit\nParamters:\n* the player who closed the menu\nreturn a Menu element that has been closed is returned\n\n```lua\nfunction exampleEscape(theMenu)\n    print(theMenu, \"menu is closed\")\nend\naddEventHandler(\"onClientMenuSelect\", theMenu, exampleEscape)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FhttpRick%2FSA-Menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FhttpRick%2FSA-Menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FhttpRick%2FSA-Menu/lists"}