Skip to content

[BUGFIX] Fix FlxInputText cursor, selection and click position when scaled - #34

Merged
AbnormalPoof merged 3 commits into
FunkinCrew:devfrom
Pooki-LTSC:fix/inputtext-scale
Oct 22, 2026
Merged

AbnormalPoof merged 3 commits into
FunkinCrew:devfrom
Pooki-LTSC:fix/inputtext-scale

Conversation

@Pooki-LTSC

@Pooki-LTSC Pooki-LTSC commented Oct 22, 2026 •

Copy link
Copy Markdown

Description

When FlxInputText has a scale other than the default, only the text itself is scaled. The cursor, selection boxes, background and border are still drawn at the default size and position, causing misalignment with the text. Pointer input also ignores scale, so interacting with scaled input boxes does not work as intended and attempting to select text causes it to select the wrong characters.

Fix

  • Cursor, selection boxes, background and border now follow the scale, origin and offset
  • Pointer input uses transformWorldToPixels() so clicking selects the correct characters
2026-10-22.03-58-45.online-video-cutter.com.mp4

Notes

HaxeUI text in the editors is blurry at higher resolutions because of it being rendered at 720p and then scaled up. Being able to properly render it larger and then scale it down would fix that issue, but input texts need to support scaling first. Currently working on a seperate PR for that but (after not listening to nyko who literally told me this was a flixel bug) didn't realize that this would need to be fixed first.

ughhhh this took way too fucking long, basically does what i put up there
… for offset

oops it sucked before now its better
tried to match it better once again

@AbnormalPoof AbnormalPoof left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also PR this upstream!

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

Successfully merging this pull request may close these issues.

2 participants