GUI Techniques: Intermediate to Advanced Video Tutorials
This video series aims to cover some more advanced ways of going about GUI. It's my first time recording tutorials for anything, and I'm forcing myself to go without notes and the like just to get more comfortable with talking/thinking at the same time. It's difficult (and I'm sure it shows), but hopefully I can still manage to teach something useful.
Most Recent Video: (Video 4) - Metatable Basics
Quote
In this tutorial, I explain the concepts of Metatables and Object Oriented Programming (find a better explanation of OOP on Wikipedia - I know mine sucks!). I feel like my explanation of metamethods is not quite as fleshed out as I would like it to be, but oh well. I've recorded this one about five times now and I'm not going to do it again unless people have a lot of trouble understanding this one.
Here is a link to a full list of metamethods: http://lua-users.org...MetatableEvents
Please note that neither __gc nor __mode are available to you in ComputerCraft.
Email: [email protected]
Video 1: Clickable menu
Quote
The reason I made this was mainly because I wanted to get a grip on talking and writing code at the same time, but I also know that some people learn better by listening than by reading.
The commented code for the whole thing can be found here: http://pastebin.com/YsqzVY8d
Video 2: Draggable Text Objects
Quote
Here is a link to the completed code: http://pastebin.com/GXRDLnSR
If you have any questions concerns, please comment below!
Video 3: Buttons & Metatables
This video ended up being a lot longer than I really wanted it to be, and my explanation of metatables is rather poor and fumbling. Hopefully it serves its purpose though and you're able to get the jist of how metatables work.
One thing that I should make note of is that at around 10:53 I mention that you need to use the rawset function in order to avoid recursion: this is actually untrue, due to the fact that you are editing the button.buttons table instead of the button table directly.
Quote
A few notes about the tutorial:
1) I have a rather terrible explanation of what a metatable/metamethod is: check the link to the Lua PIL to get a better explanation that you can be sure is 100% accurate.
2) Buttons do not necessarily need to be this complicated! In fact, this is quite a bit more complicated than it should be. The reason that I used these more advanced Lua concepts is so that I don't have to go over them later when I'm trying to teach even harder subjects.
Hope you enjoy!
Link to code with comments on pastebin: http://pastebin.com/JMegbtg6












