ComputerCraft Forums

ComputerCraft => Programs => Topic started by: KingofGamesYami on Aug 13, 2018, 01:08 AM

Title: CraftOS Themed Minimenu
Post by: KingofGamesYami on Aug 13, 2018, 01:08 AM
Reposted from here (http://www.computercraft.info/forums2/index.php?/topic/20864-ui-craftos-themed-minimenu/)

This is a small function I wrote to emulate the miniature menu of CraftOS's "edit" program. It is very easy to use, and can be used on both advanced and normal computers. It currently will not correct for smaller screen width, if you give it too many options (if you need more, see my menu (https://forums.computercraft.cc/index.php?topic=25.0)). If this is a problem, I can update it, but I don't see anyone needing that many options out of this menu.

pastebin get V455UuCr (http://pastebin.com/V455UuCr)

Usage
This menu is simple to use, simply call the function like so:
local selection = minimenu( "Option1", "Option2" )
And it will return either "Option1" or "Option2". You can add as many selections as you want, just remember to use string values.


Questions? Suggestions? Post them below!
Title: CraftOS Themed Minimenu
Post by: informer on Aug 13, 2018, 05:35 AM
I love the simplicity of this!