Consle/console manager problem.

Hi, I am not sure this is the right place to post this but there is a problem with the console. The consoles add themself as listener to all pointerdevices and keyboard devices so that all of them receive messages and not only the focused one. I thisnk the soultion would be to change the ConsoleManager to remove/add as a listenr the focused console.

Should not be a problem

Each console should check if it is focused and if not, ignore the events from keyboard & mouse

I think it is.

Yes but this design is very ugly. why we have a ConsoleManager than? plus the amount of events for mouse for example is huge and this can be a performance problem soon. Shouldn't the ConsoleManager be a PointerDeviceListener and Keyboard listener and delegate the call to the focused console? I made some refactorin last weekend to be able to support more console types( coze it was preaty much hardcoaded around TextConsole ) but the code is still ugly. Many things wich are not general for consoles ware in AbstractConsole and many general things in TextConsole. The ConsoleManager was creating hardcoded TextConsole and many other problems like that. I tried to clean up the code a bit but it is not easy and the process is not finished. What I wasn't able to find out is how can we handle the foreground color. Can we set that? I saw that when you write in the videomemory you use the first byte(or th elast can't remember) for background. Can thatone be used for foreground too? I will try to refactor more and more because for charva implementation we need a different console. I have created the RawTextConsole for charva but it is not ready yet.

Character representation

The lower byte represents the character itself and the upper byte its attributes. We can simply assume that the lower 4 bits of the upper attribute byte encode the foreground color and the upper 4 bits the background color.
This already works in JNode:
Try: charva.awt.Tutorial, in the Layout menu you will find an example with 8 different colors.