the pcs mixmatch script. http://github.com/edwinmrtn/pcs_mixmatch
there is an automatic pagination system when more than 6 buttons are added to a menu.
Each button will execute a function and/or a method on press
MenuList(int id)
Menu(int id,string title)
Button(int Id,String Nom,String Value,String Fonction,Object Object,String FoncObject,String ParamOb)
let's have a class cat like that :
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Cat = newclass("Cat") --Constructor 		function Cat:init(Id) 			self.Id = Id 		end --methods 		function Cat:getId() 			return self.Id 		end 		function Cat:speak(param) 			msg("miewwww") 			msg(param) 		end
1
2
3
2
3
function hello() 		msg("hello Basic function") end
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
--new menuList - only use this instance for all menu 		theMenuList = MenuList(0); --new menu 		local amenu = Menu(1,"Title") 		theMenuList:addMenu(amenu); --new cat 		local aCat = Cat(1) --new Bouton 		local abutton = button(1,"name","value","hello",aCat,":speak","randomString") 				 		amenu:addButton(abutton) 		amenu:Show(id)
Server.lua :
Licences :
edited 2×, last 07.11.15 06:02:26 pm
Approved by EngiN33R
Download
11 kb, 428 Downloads