posted 10 years ago
Here is my program where you simply move a shape around on screen. In the if section I have added an if statement where if you hit the "/" key it opens a new window with a blank text area. The problem is that it opens at the start of the program, and I only want it to open when you hit the slash key. Another problem is that when you close the Text window it closes the main window too, which I don't want it to. I have it in two separate classes because I believe it will be simpler to keep a new window in a new class.
And I know you will ask why do I want to add this new window, what is its functionality in the program. The reason is I am just trying to experiment with this, and would like to know how. I realize it's not practical to open separate windows but I would like to do it anyway. I am thinking maybe later I might add more functionality to this window, something like commands for a game.