|
@@ -547,13 +547,22 @@ void TextFeld::setText(const char* txt)
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
void TextFeld::setFormattedText(const char* txt)
|
|
|
{
|
|
|
lockZeichnung();
|
|
@@ -585,48 +594,62 @@ void TextFeld::setFormattedText(const char* txt)
|
|
|
tm->textStyle.add(current);
|
|
|
break;
|
|
|
case 2:
|
|
|
- current.fontSize = (unsigned char)txt[++i];
|
|
|
- tm->textStyle.add(current);
|
|
|
- break;
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 2);
|
|
|
+ current.fontSize = (unsigned char)(int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 2;
|
|
|
+ break;
|
|
|
+ }
|
|
|
case 3:
|
|
|
- current.fontColor = 0;
|
|
|
- current.fontColor |= (unsigned char)txt[++i] << 24;
|
|
|
- current.fontColor |= (unsigned char)txt[++i] << 16;
|
|
|
- current.fontColor |= (unsigned char)txt[++i] << 8;
|
|
|
- current.fontColor |= (unsigned char)txt[++i];
|
|
|
- tm->textStyle.add(current);
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 8);
|
|
|
+ current.fontColor = (int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 8;
|
|
|
+ }
|
|
|
break;
|
|
|
case 4:
|
|
|
- current.selectedColor = 0;
|
|
|
- current.selectedColor |= (unsigned char)txt[++i] << 24;
|
|
|
- current.selectedColor |= (unsigned char)txt[++i] << 16;
|
|
|
- current.selectedColor |= (unsigned char)txt[++i] << 8;
|
|
|
- current.selectedColor |= (unsigned char)txt[++i];
|
|
|
- tm->textStyle.add(current);
|
|
|
- break;
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 8);
|
|
|
+ current.selectedColor = (int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 8;
|
|
|
+ break;
|
|
|
+ }
|
|
|
case 5:
|
|
|
- current.selectedBackcroundColor = 0;
|
|
|
- current.selectedBackcroundColor |= (unsigned char)txt[++i] << 24;
|
|
|
- current.selectedBackcroundColor |= (unsigned char)txt[++i] << 16;
|
|
|
- current.selectedBackcroundColor |= (unsigned char)txt[++i] << 8;
|
|
|
- current.selectedBackcroundColor |= (unsigned char)txt[++i];
|
|
|
- tm->textStyle.add(current);
|
|
|
- break;
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 8);
|
|
|
+ current.selectedBackcroundColor = (int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 8;
|
|
|
+ break;
|
|
|
+ }
|
|
|
case 6:
|
|
|
- current.rendererIndex = (unsigned char)(txt[++i] - 1);
|
|
|
- tm->textStyle.add(current);
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 2);
|
|
|
+ current.rendererIndex = (unsigned char)(int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 2;
|
|
|
+ }
|
|
|
break;
|
|
|
case 7:
|
|
|
current.underlined = 0;
|
|
|
tm->textStyle.add(current);
|
|
|
break;
|
|
|
case 8:
|
|
|
- current.interactParam = 0;
|
|
|
- current.interactParam |= (unsigned char)txt[++i] << 24;
|
|
|
- current.interactParam |= (unsigned char)txt[++i] << 16;
|
|
|
- current.interactParam |= (unsigned char)txt[++i] << 8;
|
|
|
- current.interactParam |= (unsigned char)txt[++i];
|
|
|
- tm->textStyle.add(current);
|
|
|
+ {
|
|
|
+ Text p = "0x";
|
|
|
+ p.append(txt + i + 1, 8);
|
|
|
+ current.interactParam = (int)p;
|
|
|
+ tm->textStyle.add(current);
|
|
|
+ i += 8;
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
result.append(txt[i]);
|