UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

61 lines (60 loc) 1.74 kB
import { __decorate } from "tslib"; import { byte } from '../decorators'; import { Packet } from './base'; import { PacketType } from './enums'; /** * BuTton Click - sent back when user clicks a button */ export class IS_BTC extends Packet { constructor() { super(...arguments); this.Size = 8; this.Type = PacketType.ISP_BTC; /** ReqI as received in the {@link IS_BTN} */ this.ReqI = 0; /** Connection that clicked the button (zero if local) */ this.UCID = 0; /** Button identifier originally sent in {@link IS_BTN} */ this.ClickID = 0; /** Used internally by InSim */ this.Inst = 0; /** Button click flags */ this.CFlags = 0; this.Sp3 = 0; } } __decorate([ byte() ], IS_BTC.prototype, "Size", void 0); __decorate([ byte() ], IS_BTC.prototype, "Type", void 0); __decorate([ byte() ], IS_BTC.prototype, "ReqI", void 0); __decorate([ byte() ], IS_BTC.prototype, "UCID", void 0); __decorate([ byte() ], IS_BTC.prototype, "ClickID", void 0); __decorate([ byte() ], IS_BTC.prototype, "Inst", void 0); __decorate([ byte() ], IS_BTC.prototype, "CFlags", void 0); __decorate([ byte() ], IS_BTC.prototype, "Sp3", void 0); export var ButtonClickFlags; (function (ButtonClickFlags) { /** Left click */ ButtonClickFlags[ButtonClickFlags["ISB_LMB"] = 1] = "ISB_LMB"; /** Right click */ ButtonClickFlags[ButtonClickFlags["ISB_RMB"] = 2] = "ISB_RMB"; /** Ctrl + click */ ButtonClickFlags[ButtonClickFlags["ISB_CTRL"] = 4] = "ISB_CTRL"; /** Shift + click */ ButtonClickFlags[ButtonClickFlags["ISB_SHIFT"] = 8] = "ISB_SHIFT"; })(ButtonClickFlags || (ButtonClickFlags = {}));