I'm new to Lua but familiar with some of the basics. I'm using this library for the GUI, but not sure on the proper procedure on updating the items on the screen. I have an adapter attached to an IC2 fluid reactor and want to call reactor.getHeat() to get the latest temps and update this child:
If someone can kindly point me in the right direction I think I can go from there. The rest of my code is pretty basic which I haven't played around much on it.
local GUI = require("GUI")local component = require 'component'local reactor = component.reactor_chamber
local currentTemps = reactor.getHeat()---------------------------------------------------------------------------------- Create new applicationlocal application = GUI.application()-- Add panel that fits application
application:addChild(GUI.panel(1,1, application.width, application.height,0x262626))-- Add smaller panels
application:addChild(GUI.panel(4,2,23,4,0x880000))
application:addChild(GUI.text(5,3,0xFFFFFF,"Current Reactor Temps"))
application:addChild(GUI.text(5,5,0xFFFFFF, currentTemps))--------------------------------------------------------------------------------
application:draw(true)
application:start()
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.
Greetings,
I'm new to Lua but familiar with some of the basics. I'm using this library for the GUI, but not sure on the proper procedure on updating the items on the screen. I have an adapter attached to an IC2 fluid reactor and want to call reactor.getHeat() to get the latest temps and update this child:
If someone can kindly point me in the right direction I think I can go from there. The rest of my code is pretty basic which I haven't played around much on it.
Link to post
Share on other sites