Posted 04 December 2016 - 10:36 PM
Hey guys,
I am working on a window framework.
First, we have a (window (not from the original window API)).
(You have to use the : opperator for methods)
object data:
I am strugling with the render method.
Main: render the full line and blit it on the screen.
First idea:
Second idea:
Report changes on the screen and render them, but then you have to iterate also through all the childrens and then the program renders the line (I wanna have a process doing this).
Third idea after a long time: Ask a pro
Do you have any performance saving ideas?
Thanks in advance
Sewbacca
I am working on a window framework.
First, we have a (window (not from the original window API)).
(You have to use the : opperator for methods)
object data:
- new()
- render(number line)
- window -> Table structured like the the tables in the window API
- children -> Array, containing objects like this (children container)
- parent -> Parent object
- width/height
- cursorX/cursorY
- positionX/positionY -> in the parent container
I am strugling with the render method.
line = {
text = text,,
tCol = tCol,
bCol = bCol
}
Here are my ideas, how to render a line:Main: render the full line and blit it on the screen.
First idea:
- Collect lines, displayed on the screen (for loop through object.chlidren)
- render the lines, fitting into the screen and being ontop (object:render(line))
- render own line (concat the lines)
Second idea:
Report changes on the screen and render them, but then you have to iterate also through all the childrens and then the program renders the line (I wanna have a process doing this).
Third idea after a long time: Ask a pro
Do you have any performance saving ideas?
Thanks in advance
Sewbacca
Edited on 04 December 2016 - 09:44 PM