This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
How to delete a window
Started by Zecradox, 05 July 2018 - 05:47 PMPosted 05 July 2018 - 07:47 PM
.
Posted 05 July 2018 - 07:58 PM
If you have not redirected into the window or anything like this you should be able to do this:
win.setVisible(false)
win = nil
Posted 05 July 2018 - 08:09 PM
[removed by me, i read your post wrong]
Edited on 05 July 2018 - 06:34 PM
Posted 05 July 2018 - 08:36 PM
This doesn't work, even if i redirect out of the window i want to deleteIf you have not redirected into the window or anything like this you should be able to do this:win.setVisible(false) win = nil
Edited on 05 July 2018 - 06:36 PM
Posted 05 July 2018 - 09:08 PM
Generally, both in Ask a Pro and elsewhere, the amount of effort people are willing to put in to answer a question is dependent on how much effort it looks like the asker has put in to forming the question.
What do you mean by delete a window? If you mean hide it and restore what was there already, you can't - you need to keep each drawable region in separate buffers and redraw them.
Edited on 05 July 2018 - 07:09 PM
Posted 05 July 2018 - 11:35 PM
There's not much else to say. Delete a window (make it invisible), never to be redrawn.Generally, both in Ask a Pro and elsewhere, the amount of effort people are willing to put in to answer a question is dependent on how much effort it looks like the asker has put in to forming the question.
What do you mean by delete a window? If you mean hide it and restore what was there already, you can't - you need to keep each drawable region in separate buffers and redraw them.
Posted 06 July 2018 - 03:01 AM
There's not much else to say. Delete a window (make it invisible), never to be redrawn.Generally, both in Ask a Pro and elsewhere, the amount of effort people are willing to put in to answer a question is dependent on how much effort it looks like the asker has put in to forming the question.
What do you mean by delete a window? If you mean hide it and restore what was there already, you can't - you need to keep each drawable region in separate buffers and redraw them.
Squid already gave you the answer you are looking for then. It is possible to delete the window variable and everything about the window, but what it had drawn to the screen will stay until you draw over it. That is how all computer graphics work (even the computer you are on now). When you want a window to disappear you have to draw over it with what you want to be there. If that is what was there before the window was drawn then you'll have to keep track of what was there before the window was drawn and redraw it when the one you want to "delete" should disappear.
Posted 06 July 2018 - 03:16 AM
This is the problem that compositor was written to solve, if you'd like an example of how to do what SquidDev is talking about.
Posted 06 July 2018 - 07:14 AM
The issue here is that nobody else knows what you're thinking. Everyone has slightly different interpretations of things, as evidenced by Luca_S's reply. The more information you provide the better (well, within reason) as it helps everyone understand your problem and exactly what you're trying to achieve.There's not much else to say. Delete a window (make it invisible), never to be redrawn.