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

Login GUI

Started by smigolpol, 31 December 2012 - 02:36 AM
smigolpol #1
Posted 31 December 2012 - 03:36 AM
Hello, today I'm going to show you something simple and unoriginal, but I hope you'll find it useful or at least interesting.


Login GUI



Short description:
Title says all, this is a graphical login sytem. Maybe not very original idea, but with (I hope) very good desing. I think you'll like it. It may be really useful at servers.

Instructions:
  • Installation:
​First what you need to do is to get the code of course:

pastebin get qyLdn6NF LoginGUI

But It's NOT all!
You have saved the program, but you don't have your user registered. There's a solution for it:
  1. First run the program once.
  2. Then terminate it and clear your screen
  3. All files are now in place, when you type in "dir"(or "list", "ls", no matter), you should see the "Users" directory. What you need to do now is to edit the empty "list" file inside "Users" folder, just type in: edit Users/list.
  4. Now what you need to type in(This is the most important part, if you spell something wrong you may get errors) is just to initialize your user. To do that you need to type your username in the first free line(in case you have any other users registered before, but now it should be the first line) but NOT as string. The you need to write a simple table with 2 parameters: login and password. Here is the template for this step:

myname	--Init username, NEVER as string
{login="myname", password="mypassword"}	--Login must be exacly the same as Init username, but as a string. Login and password can be max 10 chars long(That's the length of the textfield)
  • Usage:
When you have your accounts set up, just run the program, Now you can type in your login and password. You shouldn't get any errors if you have created your user correctly and typed the password right.
  • Custom interface colors:
​This is an additional feature to make your GUI look exactly like you want. To do that just edit my program. You should see the table called "customColors", there are comments explaining which color is what, now just edit it with your own colors.

Features:
  • Multiple accounts
  • Custom colors
  • Program uses it's own read() method called input(), the only difference is that you can limit the maximal number or characters entered.
  • More coming soon!

Screenshots:




Note: My password on the screenshots is "test", don't think that my precious password is so short.


I hope you'll like it!
djawesome456 #2
Posted 15 April 2013 - 09:15 PM
Would it be ok if I could use it for my OS if I credited you for it??
billbertking1 #3
Posted 18 April 2013 - 08:41 AM
This is exactly what I was needing! I plan on using it for a server, and giving you credit cause it works great! I tried it in sp, but took me a few min to actually get it…lol
27thColt #4
Posted 22 April 2013 - 03:34 PM
Hey,can I use it for an OS that I am making.I will credit you.

the OS is called OS M