Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Why scrollWidget's height is always zero? #51

Open
nanwangjkl opened this issue Dec 17, 2020 · 0 comments
Open

Why scrollWidget's height is always zero? #51

nanwangjkl opened this issue Dec 17, 2020 · 0 comments

Comments

@nanwangjkl
Copy link

nanwangjkl commented Dec 17, 2020

const mockScroll = new PUXI.ScrollWidget({
  scrollY: true,
  scrollX: true,
  scrollBars: true,
  height: 600
}).setLayoutOptions(
  new PUXI.FastLayoutOptions({
    width: 0.5,
    height: 0.25,
    x: 0.5,
    y: 0.7,
    anchor: PUXI.FastLayoutOptions.CENTER_ANCHOR
  })
).setBackground(0xffaabb)
  .setBackgroundAlpha(0.5)
  .addChild(new PUXI.Button({ text: 'Button 1' }).setBackground(0xff))
  .addChild(new PUXI.Button({ text: 'Button 2' })
    .setLayoutOptions(new PUXI.FastLayoutOptions({ x: 0, y: 50 }))
    .setBackground(0xff))
  .addChild(new PUXI.Button({ text: 'Button 3' })
    .setLayoutOptions(new PUXI.FastLayoutOptions({ x: 0, y: 250 }))
    .setBackground(0xff))

I created a scrollwidget just like the demo shows. but the height is always 0, i can't get the scrollwidget to scroll a bit. I don't see any instruction on how to use the widget correctly. please kindly help

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

No branches or pull requests

1 participant