I’m trying to build a GUI with PunkUI, however I have a screen that can scroll around and change positions. Right away I noticed that while the buttons move with the screen, the hitboxes for the buttons do not. Is there any way to hack PunkUI to fix this, or is there a newer solution that would be more effective? The scrolling is accomplished with the basic camera.
Flashpunk - GUI, PunkUI
Set the scrollX
and scrollY
properties of your button’s graphic to 0 and all should be well!
scrollX and scrollY don’t actually apply that well with these buttons. PunkUI uses some custom stuff. However, I was able to dig into the code and find a boolean switch that changed the way they worked.
Punk.UI creator here. The library is so old and unusable. I should make a new one, and I will get to it once I have time.
@AbelToy; when you do begin making one I’d love to consult with you during the process. I have made a sort of hacked compatibility version of the old PunkUI for our Stage3DPunk library but if you’re considering making a new one it’d definitely be nice to liaison and ensure compatibility to the best of our ability!
@AbelToy - It may be old but it’s still usable, I love PunkUI and how much time it saves! It was just that one little problem with it, but I managed to find the switch in mouseIsOver() that corrected it.
I could obviously also contribute some features and insight into the new version
Hi, Teonnym. I read you said that you make PunkUI work on a screen with a moving camera… it’s really strange, as I think that it has a bug that makes windows won’t render children outside of the screen bounds, as Rolpege wrote some time ago. Have you been able to solve that?