MCPcopy Create free account
hub / github.com/esengine/esengine / setup_beforeAdd

Method setup_beforeAdd

packages/fairygui/src/widgets/GImage.ts:207–231  ·  view source on GitHub ↗
(buffer: ByteBuffer, beginPos: number)

Source from the content-addressed store, hash-verified

205 }
206
207 public setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void {
208 super.setup_beforeAdd(buffer, beginPos);
209
210 buffer.seek(beginPos, 5);
211
212 if (buffer.readBool()) {
213 this.color = buffer.readS();
214 }
215 this.flip = buffer.readByte();
216
217 const fillMethodValue = buffer.readByte();
218 if (this._image) {
219 this._image.fillMethod = fillMethodValue;
220 if (this._image.fillMethod !== EFillMethod.None) {
221 this._image.fillOrigin = buffer.readByte();
222 this._image.fillClockwise = buffer.readBool();
223 this._image.fillAmount = buffer.getFloat32();
224 }
225 } else if (fillMethodValue !== EFillMethod.None) {
226 // Skip bytes if _image not ready
227 buffer.readByte(); // fillOrigin
228 buffer.readBool(); // fillClockwise
229 buffer.getFloat32(); // fillAmount
230 }
231 }
232}

Callers

nothing calls this directly

Calls 5

readBoolMethod · 0.80
readSMethod · 0.80
readByteMethod · 0.80
getFloat32Method · 0.80
seekMethod · 0.65

Tested by

no test coverage detected