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

FlxInputText is not getting focus #248

Open
harpwood opened this issue Jun 26, 2023 · 2 comments
Open

FlxInputText is not getting focus #248

harpwood opened this issue Jun 26, 2023 · 2 comments
Labels

Comments

@harpwood
Copy link

FlxInputText is not getting focus if the camera (gCamera) zoom is not 1. The FlxInputText is in other camera (uiCamera) without zoom, but it seems to get affected by the zoomed camera (gCamera) somehow. If I set the zoom of gCamera to 1 the FlxInputText can focus on mouse click and works as intended.

@Geokureli Geokureli added the Bug label Aug 2, 2023
@Jome666999
Copy link

I've found that the same behaviour occurs when i call myMainCamera.focusOn(myGameSprite.getGraphicMidpoint());.
I've also found that if the main camera only moves a small amount, the FlxInputText CAN get focus, but it acts like the hitbox is offset by however much the main camera has moved by.

@Vulpicula
Copy link

Similar issue appears with multi-camera setups, and extends to more than just FlxInputText. Buttons are impacted too!

I currently have a camera for my game's UI, and in that have an options menu. The click area for the x and y appears to remain at the initial spot regardless of how much I zoom/move the camera around. I can share code if needed!

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

No branches or pull requests

4 participants