Skip to content

Helper function for sending InSim buttons #51

Description

@mkapal

Problem

  • If you want to create a button with a type-in dialog including a caption, you must send the caption in the Text property delimited by zero-bytes: '\0Caption\0Text'.

Current API

inSim.send(new IS_BTN({
  ReqI: 1,
  L: 60,
  T: 4,
  W: 20,
  H: 5,
  TypeIn: 20,
  Text: '\0Caption\0Text',
}))

Proposed API

inSim.sendButton({
  requestId: 1,
  left: 60,
  top: 4,
  width: 20,
  height: 5,
  text: 'Text',
  typeIn: 20,
  caption: 'Caption',
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions