As the topic says I'm wondering how to redirect the term to write only in the window.
Here's an example of what a window looks like
local window = {
title = "Testing Window";
color = colors.white;
top_background=colors.cyan;
background = colors.white;
sX=1; fX=20; sY=1; fY=10;
resizable=true;
}
The function that initializes the window will calculate and get the window height & width. Then those numbers are inserted into the window so you can access them like this-- window.w < Width of the window -- window.h < Height of the windowNow I'm currently doing this when overriding term functions and are keeping this in a function called redirect in the API
I also have a function that restores the native functions so I can write normally.
term.setCursorPos = function( x, y ) term.native.setCursorPos( (window.sX-1)+x, window.sY + x ) end term.getSize = function() return window.w, window.h endBut's that's all I'm currently doing since I'm unsure which functions I should override and how I would do this efficiently.
Help is much appreciated












