frontend: support input + refactoring
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
export class ModifierState {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):ModifierState {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
shift():boolean {
|
||||
return !!this.bb!.readInt8(this.bb_pos);
|
||||
}
|
||||
|
||||
ctrl():boolean {
|
||||
return !!this.bb!.readInt8(this.bb_pos + 1);
|
||||
}
|
||||
|
||||
alt():boolean {
|
||||
return !!this.bb!.readInt8(this.bb_pos + 2);
|
||||
}
|
||||
|
||||
meta():boolean {
|
||||
return !!this.bb!.readInt8(this.bb_pos + 3);
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static createModifierState(builder:flatbuffers.Builder, shift: boolean, ctrl: boolean, alt: boolean, meta: boolean):flatbuffers.Offset {
|
||||
builder.prep(1, 4);
|
||||
builder.writeInt8(Number(Boolean(meta)));
|
||||
builder.writeInt8(Number(Boolean(alt)));
|
||||
builder.writeInt8(Number(Boolean(ctrl)));
|
||||
builder.writeInt8(Number(Boolean(shift)));
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user