mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-23 07:36:54 +01:00
sim: BL0942 object with controller (sends BL0942 packets); not finished yet; also fix Text edit cursor
This commit is contained in:
@@ -31,6 +31,9 @@ class CShape *CShape::findShapeByName_r(const char *name) {
|
||||
class CJunction *CShape::asJunction() {
|
||||
return dynamic_cast<CJunction*>(this);
|
||||
}
|
||||
class CText *CShape::asText() {
|
||||
return dynamic_cast<CText*>(this);
|
||||
}
|
||||
void CShape::snapToGrid() {
|
||||
Coord n = roundToGrid(getPosition());
|
||||
setPosition(n);
|
||||
@@ -134,8 +137,10 @@ class CShape* CShape::addRect(int x, int y, int w, int h) {
|
||||
addShape(n);
|
||||
return n;
|
||||
}
|
||||
class CShape* CShape::addText(int x, int y, const char *s) {
|
||||
class CShape* CShape::addText(int x, int y, const char *s, bool bDeepText, bool bAllowNewLine) {
|
||||
CText *n = new CText(x, y, s);
|
||||
n->setDeepText(bDeepText);
|
||||
n->setAllowNewLine(bAllowNewLine);
|
||||
addShape(n);
|
||||
return n;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user