mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-03 21:37:04 +03:00
Compare commits
3
Commits
c043690b13
...
189e2053d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
189e2053d6 | ||
|
|
6923b07f6c | ||
|
|
c12a79d6e6 |
No files matched your search
@@ -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);
|
||||
|
||||
@@ -120,7 +120,13 @@ int32_t Script_GetDebugStats(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_IsDebugBuild(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
#if defined(NDEBUG)
|
||||
lua_pushboolean(L, 0);
|
||||
#else
|
||||
lua_pushboolean(L, 1);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_RegisterCVar(lua_State* L) {
|
||||
|
||||
Reference in new issue
Block a user