Jump to content




Confirm Box / Normal Box / Scrollable Text box functions


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

#1 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 10 February 2013 - 01:56 AM

So I made this for my new ComputerCraft YouTube program and thought I may as well post it here as it's quite handy, imo.

The functions can be found here

Usage Example (confirmBox and drawBox functions):

How it works:
borderCol  = colour of the outside border
boxCol	 = colour of the inside of the box
headingCol = colour of the heading that appears at the top of the box
textCol	= colour of the text that appears within the box
xStart	 = starting X position of the box (top left hand corner of the box)
xEnd	   = ending X position of the box (top right hand corner of the box)
yStart	 = starting Y positon of the box (top line)
...		= arguments, accepts as many as you want. First one is the title.

The height of the box is determined by how many strings you give it.

Spoiler

Usage Example (textBox function):
(This box allows as much text as you need - supports scroll!)

How it works:
--[[
	 boxCol = colour of the entire box
	 textCol = colour of the text inside of the box area
	 xStart = starting X position of the box
	 xEnd = ending X position of the box
	 yStart = starting Y position of the box
	 yEnd = ending Y position of the box
	 tText = Can be a string OR a table
	 
	 String:
		- Use '\n' to separate lines.
	 Table:
		- Make sure lines are WELL spaced for the area
		  of the box or else it will fail!
--]]

Spoiler


#2 Getalife

  • Members
  • 6 posts

Posted 10 February 2013 - 04:45 AM

Nice functions :D

#3 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 10 February 2013 - 05:59 AM

Thanks :P Took a few minutes to make them

#4 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 15 May 2013 - 03:34 AM

Now this is usefulness. Nice. Reminds me of GameMaker GML Message box scripting...

#5 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 26 May 2013 - 06:48 PM

This is pretty nice man! Also, very usefull!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users