Returns string containing info about this object for debugging * @return {string}
()
| 943 | /** Returns string containing info about this object for debugging |
| 944 | * @return {string} */ |
| 945 | toString() |
| 946 | { |
| 947 | let text = 'type = ' + this.constructor.name; |
| 948 | if (this.text) |
| 949 | text += '\ntext = ' + this.text; |
| 950 | if (this.pos.x || this.pos.y) |
| 951 | text += '\npos = ' + this.pos; |
| 952 | if (this.localPos.x || this.localPos.y) |
| 953 | text += '\nlocalPos = ' + this.localPos; |
| 954 | if (this.size.x || this.size.y) |
| 955 | text += '\nsize = ' + this.size; |
| 956 | if (this.color) |
| 957 | text += '\ncolor = ' + this.color; |
| 958 | return text; |
| 959 | } |
| 960 | |
| 961 | /** Called if uiDebug is enabled |
| 962 | * @param {boolean} visible */ |