Flashpunk - GUI, PunkUI


(Teonnyn) #1

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.


(Justin Wolf) #2

Set the scrollX and scrollY properties of your button’s graphic to 0 and all should be well!


(Teonnyn) #3

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.


(Abel Toy) #4

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.


(Ultima2876) #5

@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!


(Teonnyn) #6

@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.


(Abel Toy) #7

haha yeah but it can really be improved. I have big plans for it.


(Ultima2876) #8

I could obviously also contribute some features and insight into the new version :wink:


(Zoltam) #9

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?