(buffer: ByteBuffer)
| 667 | } |
| 668 | |
| 669 | protected readItems(buffer: ByteBuffer): void { |
| 670 | const cnt = buffer.getInt16(); |
| 671 | for (let i = 0; i < cnt; i++) { |
| 672 | const nextPos = buffer.getInt16() + buffer.position; |
| 673 | |
| 674 | let str = buffer.readS(); |
| 675 | if (!str) { |
| 676 | str = this._defaultItem; |
| 677 | if (!str) { |
| 678 | buffer.position = nextPos; |
| 679 | continue; |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | const obj = this.getFromPool(str); |
| 684 | if (obj) { |
| 685 | this.addChild(obj); |
| 686 | this.setupItem(buffer, obj); |
| 687 | } |
| 688 | |
| 689 | buffer.position = nextPos; |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | protected setupItem(buffer: ByteBuffer, obj: GObject): void { |
| 694 | let str = buffer.readS(); |
no test coverage detected