Allow watching variables, and having a "Watches" panel
While writing, testing and debugging sometimes you want to watch the value of a variable while the game runs.
This issue is to implement a new "Watches" panel to go alongside the existing StatsPanel
and PartitionerPanel
(which are bound to function keys by default).
There will also be an API for registering and unregistering watches:
// Watch a variable by pointer, updated each frame
window->new_dynamic_watch("myvar", &myvar);
// ...
window->delete_watch("myvar");
// Create a watch, and then update it manually
window->new_manual_watch("myvar", 0);
// ...
window->update_manual_watch("myvar", 1);
// ...
window->delete_watch("myvar");
When the watches panel is activated, these variables will be listed alphabetically down the left hand side of the window.