mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(console): reset highlight when console is closed
This commit is contained in:
parent
d30d5c49dc
commit
669e093ef2
@ -4,6 +4,8 @@
|
|||||||
#include "event/Event.hpp"
|
#include "event/Event.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
void ResetHighlight();
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
int32_t OnChar(const EVENT_DATA_CHAR* data, void* param) {
|
int32_t OnChar(const EVENT_DATA_CHAR* data, void* param) {
|
||||||
@ -27,7 +29,7 @@ int32_t OnKeyDown(const EVENT_DATA_KEY* data, void* param) {
|
|||||||
|
|
||||||
// Reset the highlight when toggled off
|
// Reset the highlight when toggled off
|
||||||
if (!ConsoleGetActive()) {
|
if (!ConsoleGetActive()) {
|
||||||
// TODO ResetHighlight();
|
ResetHighlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -37,7 +39,8 @@ int32_t OnKeyDown(const EVENT_DATA_KEY* data, void* param) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO handle other keys
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,6 +87,10 @@ void PaintText(void* param, const RECTF* rect, const RECTF* visible, float elaps
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ResetHighlight() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
void ConsoleScreenAnimate(float elapsedSec) {
|
void ConsoleScreenAnimate(float elapsedSec) {
|
||||||
auto finalPos = ConsoleGetActive() ? std::min(1.0f - s_consoleHeight, 1.0f) : 1.0f;
|
auto finalPos = ConsoleGetActive() ? std::min(1.0f - s_consoleHeight, 1.0f) : 1.0f;
|
||||||
finalPos = std::max(finalPos, 0.0f);
|
finalPos = std::max(finalPos, 0.0f);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user