Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example usage #2

Closed
wobsoriano opened this issue Apr 11, 2022 · 1 comment
Closed

Example usage #2

wobsoriano opened this issue Apr 11, 2022 · 1 comment

Comments

@wobsoriano
Copy link

wobsoriano commented Apr 11, 2022

Sorry, not really an issue but, is this being used somewhere? Interested to see how to use it! :D

@wobsoriano
Copy link
Author

Nevermind. Saw an example on deno_bindgen

const fixedStr = new byteType.FixedString(5)

const _Input = new byteType.Struct({
  title: fixedStr,
  icon: byteType.i16,
  height: byteType.u32le,
  width: byteType.u32le,
  okLabel: fixedStr,
  noWrap: byteType.bool,
  extraButton: fixedStr
});

function run() {
  const _buf_a0 = new Uint8Array(_Input.size);
  const _view_a0 = new DataView(_buf_a0.buffer);
  _Input.write(_view_a0, 0, {
    title: 'Quit app?',
    icon: 2,
    height: 300,
    width: 300,
    okLabel: "OK",
    noWrap: true,
    extraButton: "CANCEL"
  });
  sys.symbols.showDialog(_buf_a0);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant