Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Sledger721's Frame Buffer/Screen Class Idea.
- cScreen, cFrame_buffer = graphics.init() -- Initiating graphics.
- cFrame_buffer.bState = false -- Setting the state switch to false.
- --Content would be put into cFrame_buffer like:
- cFrame_buffer.tConent=some;content;to;be;parsed;blah;blah;etc -- Filling it with content.
- while true do
- if cFrame_buffer.bState == true then -- The only reason that I have it switch around with the state boolean is so that the user could see this script and have more control, most likely to add a parser to it.
- parsed_content = graphics.parse(cFrame_buffer.tContent) -- Parsing it.
- cScreen.contents = parsed_content -- If the state is true, lay the content of the buffer onto the screen.
- end
- if cFrame_buffer.tContent ~= nil then
- cFrame_buffer.bState = true -- If there is any content in the buffer, then tell the state to be true.
- end
- graphics.render(cScreen) -- Render the screen class.
- graphics.buffer(cFrame_buffer) -- Buff the buffer class.
- end
Advertisement
Add Comment
Please, Sign In to add comment