Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Chaoschaot234

Buttons, Loading Bars, Pages and Content but how?

Question

Hey together,

I have a few questions but before I am going to ask them I won't get a compleat written down script. The only goal is to understand how things are working or how some pice of code.

What I currently want is to create a multipaged programm to control my entire base (this should later includ the bases on other plantes (GalacticCraft)). This means for me including:

  • the AE2/LP crafting (here I should mention that OpenPeripherals is installed, also OCLights 2 but OpenComputers is not installed),
  • creating a map from my base with showing the current playerposition (eventually showing the players head instand as of showing a small colored pixel and if possible it should update the position on the screen after 2-5 sec)
  • minechem integration
  • genetics/bees integration
  • I have also seen a teleporter in a yt video which was used over a CC program and I assume that it was the ender io ones but I have never played with it yet
  • oxygen state to see if rooms are pressurized (this should be a small function I think)
  • and much more

All this stuff above should be packed in pages but I have currently never seen any oc programm which uses pages and it will also be nice to get a pice of code for a loadingbar which shows up for 5-10 sec (hardcoded) or wit a
parameter for the loading time (this is just a fun feature which can be added ad the end of the main program).

But how to show all those stuff?
I thought about a menu bar on the top screen (defult stlye) and under it all the pages with there content so if I click on the element "Energy > Storage I (SubMenuItem)" the place below should be cleared and drawn with the related
content (e. g. name of the energy storage and a drawn bar showing current energy level in rf/eu (in %)) and if I then switch to another page the last known state of some vars should be saved (I prefere json to store the data).

If it can be made I want a GUI in the startrek console style with all it's glamour and so on so no real menu bar is required because it is solved over buttons (found the ported DW20 Button API here in this forum which is rly nice) which
should then load the pages too but each layer of buttons should redraw the layer of sub-buttons (if there are any of them) like a big button menu.

I know that this will be a lot of stuff todo but at the end it should work smoothly even if the first file will be written dirty :P .
Well, then the last question: To not write all the nice stuff in a one billion line file is it possible to cut out the pices? E. g. creating the file main.lua with the hole controlment and if a related button/menuitem is pushed it should load
the coresponding file, e. g. energyStorage.lua (safed under modules/). I know that this can be done over the filesystem, right?

I hope to get this working but not all will be implemented yet since I have no BigReactors I have only IC2, Solarpanels and Immersive Engeneering because currently NuclearCraft does not have any CC/OC support yet.

And yes, I have a bit knowledge in lua programming not such many but the basics are definitly there.
Ok, I hope that I have wrapped all together and did not forgotten any important point so if something is not clear enough feel free to ask me :) .

Scripts:

Currently no scripts available but if I am starting they will be accesable over github (better then pastbin I think). Hope that I'll did well to get it working fine :).

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.