I'm writing a little program that I want to use to control some engines based on the level of the attached energy cell. I've got that code sorted just perfectly as I've done this many times before.
However, I'd like to have some buttons on my monitor that allow me to override the automatic function as and when needed.
I'm pretty sure I know all the code I need to do the buttons, however, I'm having some trouble figuring out how to get the os.pullEvent and yet have the program running in the background still.
- Will I have to use the parallel API or is there a simpler way for just having a couple of buttons controlling that application?
I basically want a toggle button in the bottom left of the monitor that will switch the engines on if they're off and off if they're on and then another button on the bottom right which will be a "reset to auto" button. The program runs just fine at the moment without the buttons, monitoring the Energy cell and applying a redstone signal once the cell reaches a certain threshold and then removing the redstone signal when reaching another threshold.
For reference: I'm using FTB monster V1.1.2 on MC 1.6.4.
Thanks for help in advance.