Jump to content




[UI] CraftOS Themed Menu


  • You cannot reply to this topic
4 replies to this topic

#1 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 20 August 2014 - 03:08 AM

Alright, so I was bored and I saw a post in Ask A Pro where someone was creating a menu, and I thought, "You know, I could probably make a simple yet flexible menu". It turned out a bit better than I expected, and a lot more challanging. However, I present the final result to you today.

Here's how it works: You give the function a title and a bunch of options. It displays the title and allows the users to scroll through the options, creating multiple pages if necessary. Additionally, if you run it on an advanced computer (this is compatible with normal computer), it will color the brackets yellow. There's probably a million different ways to code this thing, but here's what I've come up with: Demo with GravityScore & 1lann's HTML Emulator
code

pastebin get gbxiZJtc

Better description of usage:
local option = menu( "Select an option", "option_1", "option_2", "option_3" )
if option == "option_3" then
--#do stuff
elseif option == "option_2" then
--#do stuff
elseif option == "option_1" then
--#do stuff
end

Edited by KingofGamesYami, 22 August 2014 - 02:17 PM.


#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 August 2014 - 04:49 PM

Update: Now with Dynamic Brackets!

#3 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 21 August 2014 - 05:41 PM

Screenshots pls

#4 Lignum

  • Members
  • 558 posts

Posted 21 August 2014 - 06:57 PM

View Postrhyleymaster, on 21 August 2014 - 05:41 PM, said:

Screenshots pls
The post links to a demo. No screenshots necessary.

#5 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 22 August 2014 - 02:19 PM

Updated the pastebin with Dynamic Brackets (man, I thought I already did, but...)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users