Sample code:
Sample = {}
function Sample.StepHandler()
tpt.fillrect(55, 55, 111, 111, 255, 255, 255, 125)
end
function Sample.Init()
tpt.register_step(Sample.StepHandler)
local cancelBtn = Button:new(55, 111, 17, 111, "Poor button")
interface.addComponent(cancelBtn)
end
Sample.Init()
The fillrect will always covers the control (a poor button in the example), can I control the render sequence so that I can decide which is on top and which is in the bottom?
I try to do this because I found that event registered by tpt.register_xxx is not updating in window created by
interface.addComponent, then my first attempt is to add controls to the main window, manually add a "window" for them, but my "window" simply, however, covers all the controls...
Then how can I do that? I need some controls and too lazy to implement all of them myself, and I need to update the main window at the same time.
Should I simply fill all the empty space in the given area except that there's a control? That looks silly...