sim: BL0942 object with controller (sends BL0942 packets); not finished yet; also fix Text edit cursor

This commit is contained in:
openshwprojects
2022-12-07 01:10:23 +01:00
parent d7911fd4c9
commit 1ad2e00a7c
16 changed files with 229 additions and 10 deletions

View File

@@ -32,6 +32,8 @@ CShape *CText::cloneShape() {
CText *r = new CText();
r->pos = this->pos;
r->txt = this->txt;
r->bDeepText = this->bDeepText;
r->bAllowNewLine = this->bAllowNewLine;
this->cloneShapeTo(r);
return r;
}
@@ -61,7 +63,9 @@ bool CText::processKeyDown(int keyCode) {
return true;
}
if (keyCode == SDLK_RETURN) {
appendText("\n");
if (bAllowNewLine) {
appendText("\n");
}
}
return false;
}