Lordy Posted July 1, 2009 Share Posted July 1, 2009 (edited) Yet Another Menu Library v1.1 [attachment=0]menu.png[/attachment] https://community.multitheftauto.com/index.php?p= ... ils&id=339 A lib for creating various menus. Instructions: - Copy menu_c.lua and black.png from the resource to your resource and add lines <script src="menu_c.lua" type="client" /> <file src="black.png" type="client" /> to your meta.xml and you are free to use the functions Features: - Creating menus, dynamically managing rows, various functions for row hover, row click. Functions: menu:create(title) -- returns the menu menu:destroy() -- returns true menu:setPosition(x,y,relative) -- returns the menu menu:setSize(w,h,relative) -- returns the menu menu:show() -- returns the menu menu:hide() -- returns the menu menu:addRow(title) -- returns the row menu:setProperty(name,value) -- returns the menu menu:getProperty(name) -- returns the value menu:getPosition() -- returns absolute x and y row:setTitle(title) -- returns the row row:setProperty(propertyname,value) -- returns the row row:addOnClick(function) -- returns the row row:addOnEnter(function) -- returns the row row:addOnLeave(function) -- returns the row row:setColor(r,g,b) -- returns the row row:setHoverColor(r,g,b) -- returns the row row:setFont(fontname) -- returns the row row:setHoverFont(fontname) -- returns the row row:addSubMenu(submenutitle) returns sub menu table row:getTitle() -- returns row title row:getProperty(propertyname) -- returns the property value or false row:getOnClick() -- returns the table with functions which are triggered onClick row:getOnEnter() -- returns the table with functions which are triggered onEnter row:getOnLeave() -- returns the table with functions which are triggered onLeave row:getColor() -- returns a table which is {r,g,b} row:getHoverColor() -- returns a table which is {r,g,b} row:getFont()-- returns font name row:getHoverFont() -- returns font name row:getPosition(relative) -- returns x position and y position row:setAlign(horizontal,vertical) -- Note that it doesn't seem to work at the moment. Comments/bugs welcome Edited July 2, 2009 by Guest Link to comment
robhol Posted July 1, 2009 Share Posted July 1, 2009 Nice, but how about providing the actual arguments for those functions? Link to comment
Lordy Posted July 1, 2009 Author Share Posted July 1, 2009 Yes, that will come, but I don't have any documentation of it yet And that will come when that will come. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now