Closed chrisjd20 closed 3 years ago
Not really, though termloop doesn't really do any cleaning up so you're probably safe to just do whatever game-specific cleanup you require and then do os.Exit
or similar
Thats basically what I ended up doing. Problem was closing it that way doesnt reset the terminal back to normal before exit so I had to do:
fmt.Print("\033[0m")
fmt.Print("\033[32m")
fmt.Print("\r\033[K")
fmt.Print("\033[H\033[2J")
os.Exit(0)
This should reset the terminal before exiting (on Nix at least).
Is there a way to programatically stop a termloop Game object? There is a Start function but no stop far as I can tell. Only way is to press key so far.