This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
kylergs's profile picture

GUI Program (Reads data from text files) now with an API

Started by kylergs, 27 November 2012 - 05:03 AM
kylergs #1
Posted 27 November 2012 - 06:03 AM
I have a new GUI program, it allows for many menus and reads their data from text files.
It can present the data as text, a program link, a function link or a special command (back / quit)
Has mouse and key support

Here is am example of a short menu:
Spoiler

All the menus are automatically scroll-able and the program is set up so that extras can be added.
I added a logon system as an example - It is a separate program but using API's and function calling it works with ease.
The colours are set by the user.

Here is the code:
http://pastebin.com/cjfdjHKh

(And the example logon system code: http://pastebin.com/taR9D8Z7 )

Here is what the text file looks like for that example:
http://pastebin.com/iKVYhp26
are here is a template
http://pastebin.com/6rpFFDm3

Possible types are:
"sfunc" - calls a function (needs editing of GUI code)
"menu" - Opens a new menu
"special" - Runs either back or quit
"program" - runs a program
"text" - Nothing happens on click / enter

All menus are saved under /GUI/GUImopt/
each menu has a file
I stored the login program under /GUI/

Any suggestions welcome.

Next step is to turn it into an API for other programs to use.


Here is that API !!!

http://www.computerc...ker/#entry56768
Expenox #2
Posted 28 November 2012 - 01:34 PM
Cool.
Dlcruz129 #3
Posted 28 November 2012 - 01:35 PM
Cool, not bad for someone fairly new to the forums. +1
Orwell #4
Posted 28 November 2012 - 03:47 PM
Cool, not bad for someone fairly new to the forums. +1
This is good compared to a lot of old users on the forums as well. Good job kylergs!
rhyleymaster #5
Posted 28 November 2012 - 06:30 PM
This is pretty sick!
kylergs #6
Posted 29 November 2012 - 06:45 AM
Thanks Guy's! This didn't get any attention for a while and I was worried it would sink. Any suggestions about this or the API I am working on?
bjornir90 #7
Posted 29 November 2012 - 06:58 AM
Look really cool !
Edit : I didn't notice but : 100th post !!! :D/>
KillaVanilla #8
Posted 29 November 2012 - 12:39 PM
Wow.

I no longer have to weep about my lack of experience in making GUIs!
kylergs #9
Posted 30 November 2012 - 11:39 AM
Thanks again guy's. I've been a bit busy lately so I haven't really had a chance to work on it. Again, any suggestions?
makerimages #10
Posted 03 December 2012 - 01:18 AM
comment your code a bit, I`d like to have something like this in my os for the program menu
kylergs #11
Posted 03 December 2012 - 02:57 AM
comment your code a bit, I`d like to have something like this in my os for the program menu

OK sorry, I will be releasing an API for this later but I'll try get it commented when I get a chance.
kylergs #12
Posted 06 December 2012 - 09:53 AM
API released, see above