feat(console): animate console open and close

This commit is contained in:
fallenoak 2023-04-17 22:44:44 -05:00 committed by GitHub
parent 56092c6700
commit df1ab32267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 2 deletions

View file

@ -1,5 +1,6 @@
#include "console/Handlers.hpp"
#include "console/Console.hpp"
#include "console/Screen.hpp"
#include "event/Event.hpp"
#include <cstdint>
@ -11,7 +12,10 @@ int32_t OnChar(const EVENT_DATA_CHAR* data, void* param) {
}
int32_t OnIdle(const EVENT_DATA_IDLE* data, void* param) {
// TODO
// TODO repeat buffer logic
ConsoleScreenAnimate(data->elapsedSec);
return 1;
}
@ -28,7 +32,7 @@ int32_t OnKeyDown(const EVENT_DATA_KEY* data, void* param) {
return 0;
}
if (EventIsKeyDown(ConsoleGetHotKey()) || !ConsoleGetActive()) {
return 1;
}