10 posts
Posted 09 July 2015 - 09:32 AM
OK, so I've looked all over the internets but NOWHERE is there a tutorial on how to make visible buttons INSIDE the wireless computer/normal computer!
All I've seen so far are just scripts and tutorials on how to make buttons for monitors!
If anyone knows how to make buttons like direwolf20 did in his singleplayer series for his mining quarry, please show me how! It would be greatly appreciated!
PLEASE! I really need ot learn how to make these buttons! XD
Thank you in Advance!
~Silent_Devil!
1190 posts
Location
RHIT
Posted 09 July 2015 - 02:16 PM
If you want, you can check out my video tutorial
here. It may be more complicated and go more in-depth than what you're looking to do. However, the logic behind buttons isn't exclusive to monitors even if tutorial writers say it is. If it works on the monitor, it should take minimal changes to get it working on the computer.
This text tutorial is very well laid out and understandable, and although it uses a monitor there should be no difficulties in translating it to a computer. Give it a try and if you run into problems with your code post in this thread with your specific issue.
Edited on 09 July 2015 - 12:17 PM
1190 posts
Location
RHIT
Posted 09 July 2015 - 03:56 PM
Okay, I actually think those tutorials might be overkill if you just want a simple button. I've just written up a short text tutorial on buttons which use the terminal instead of monitors. You can find that
here.
10 posts
Posted 10 July 2015 - 01:23 AM
WOW! Thank you so much Bubba! Your written tutorial was extremely useful! Thank you SO MUCH! You really are a pro! XD
But I have one question, and I don't know if you already covered this… but is there a way for me to make the buttons larger and change their position on the screen so that the are in the middle?
And also, how do I add another button?
Thanks! :D/>
Edited on 10 July 2015 - 02:13 AM
1190 posts
Location
RHIT
Posted 10 July 2015 - 03:02 PM
snip
You're welcome! Glad to help. I thought about including those things in the tutorial, but I wasn't sure about your use case and I wanted to keep things pretty short when I wrote it up. I've gone ahead and added a height/positioning part to the tutorial (it starts after the old content ended - link hasn't changed).
As to adding another button, you just do this:
local buttons = {
[1] = {
... -- You've seen this, just use the example from the tutorial
}, [2] = { -- Here is the second button
... -- Use the same fields that you used in the first button
}, [3] = {
... -- etc. etc., ad infinitum
}
}
If anything is incoherent, let me know. I'm due for some sleep!
Edited on 10 July 2015 - 01:03 PM
10 posts
Posted 11 July 2015 - 02:18 AM
OK! THANK YOU SO MUCH! I really do appreciate this! Now I'll be able to simplify 4 programs into one with these buttons! You're the best! :D/> :D/> :D/> :)/> :D/> :D/> :D/>
OK, so apparently it calls nill on the first line of defining it's position….? Please help?
Edited on 11 July 2015 - 12:56 AM
957 posts
Location
Web Development
Posted 11 July 2015 - 06:40 AM
OK, so apparently it calls nill on the first line of defining it's position….? Please help?
Well, there are a few things that might be happening.
Check your spelling. And again for good measure!
If that isn't it, post your code here and we can take a look at it.
10 posts
Posted 11 July 2015 - 07:48 AM
well,
Here is my code, but as I am a beginner, i obviously have n idea what could be going wrong. There is also another issue, but I'm sure you'll find that if you run the code
1190 posts
Location
RHIT
Posted 11 July 2015 - 08:10 AM
Alright, well I took a look at your code and figured out the problems:
here's the fixed version.
Things I fixed:
- Removed random setTextScale(5) on lines 26, 33, and 49 (term does not support this – only monitors support setTextScale)
- Changed setSize to getSize on line 113
- Removed extra buttons table with invalid Lua syntax on lines 115 through 120
You may benefit from reading through a Lua tutorial like
the one here if you're having trouble with Lua syntax. I'm not really sure what you're doing in that first function (boot_logo) so I just left it alone, but lines 3-12 are completely pointless and don't do anything.
Edited on 11 July 2015 - 06:16 AM
10 posts
Posted 12 July 2015 - 06:09 AM
Thank you for your help, I really appreciate it. And the first function is fir a loading screen. I am currently working on a logo so I left that bit there for future use. But thank you so much for all your help. Do you think it would be possible for you to put in another button positioned below the other one for me please? If you put in the "shell" of the code i can go through and tell it what I want it to do. Thank you so much though and I really appreciate all your help!
Also, new problem. When I click the button once it is all good, but when I click it again, the program just shuts off? I don't know what happened…… I haven't changed your code, any ideas?
Edited on 15 July 2015 - 12:40 AM