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

Method setup_beforeAdd

packages/fairygui/src/widgets/GTextInput.ts:202–234  ·  view source on GitHub ↗
(buffer: ByteBuffer, beginPos: number)

Source from the content-addressed store, hash-verified

200 }
201
202 public setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void {
203 super.setup_beforeAdd(buffer, beginPos);
204
205 buffer.seek(beginPos, 4);
206
207 let str = buffer.readS();
208 if (str) {
209 this.promptText = str;
210 }
211
212 str = buffer.readS();
213 if (str) {
214 this.restrict = str;
215 }
216
217 const iv = buffer.getInt32();
218 if (iv !== 0) {
219 this.maxLength = iv;
220 }
221
222 const keyboardTypeValue = buffer.getInt32();
223 if (keyboardTypeValue !== 0) {
224 if (keyboardTypeValue === 4) {
225 this.keyboardType = EKeyboardType.Number;
226 } else if (keyboardTypeValue === 3) {
227 this.keyboardType = EKeyboardType.Url;
228 }
229 }
230
231 if (buffer.readBool()) {
232 this.password = true;
233 }
234 }
235}

Callers

nothing calls this directly

Calls 4

readSMethod · 0.80
getInt32Method · 0.80
readBoolMethod · 0.80
seekMethod · 0.65

Tested by

no test coverage detected