mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
Merge c12a79d6e6 into 0bb3ac157f
This commit is contained in:
commit
66d29d87cb
@ -84,6 +84,26 @@ CONSOLELINE::~CONSOLELINE() {
|
||||
}
|
||||
}
|
||||
|
||||
void CONSOLELINE::Backspace() {
|
||||
if (this->inputpos > this->inputstart) {
|
||||
if (this->chars <= this->inputpos) {
|
||||
this->buffer[this->inputpos - 1] = '\0';
|
||||
}
|
||||
else {
|
||||
memcpy(
|
||||
&this->buffer[this->inputpos - 1],
|
||||
&this->buffer[this->inputpos],
|
||||
this->chars - this->inputpos + 1
|
||||
);
|
||||
}
|
||||
|
||||
this->inputpos--;
|
||||
this->chars--;
|
||||
|
||||
SetInputString(this->buffer);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawBackground() {
|
||||
uint16_t indices[] = {
|
||||
0, 1, 2, 3
|
||||
|
||||
@ -19,6 +19,7 @@ class CONSOLELINE : public TSLinkedNode<CONSOLELINE> {
|
||||
|
||||
// Member functions
|
||||
~CONSOLELINE();
|
||||
void Backspace();
|
||||
};
|
||||
|
||||
void ConsoleScreenAnimate(float elapsedSec);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user