-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
FIX getTextInput does nothing (DefaultLwjgl3Input.java-getTextInput) #7110
Conversation
Can someone with a Mac test this, or tell me if using Swing in LWJGL3 is still a no-go? |
This looks similar to gdx-dialogs, which works well with LWJGL3 (can cause crashing on Linux if you invoke it before libGDX initialises, but is always fine if after). |
It’s been two weeks since I made this PR. I am wondering why it is not being reviewed yet. Can someone have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't understand why this works.
My impression was always that Swing/AWT+LWJGL3 on macOS is a big no-no.
Is there a reason why you didn't copy the implementation of LWJGL2?
Is this tested without using the awt extension support? |
I am developing a small mobile game, but I need to debug it on the arm's Mac, which only supports building based on lwjgl3. Therefore, I have done the above work |
If there is no support for awt components, it may not be possible to listen to keyboard events properly, but input can still be done |
/*** input number filter */ | ||
private static class PlainDocumentNumber extends PlainDocument { | ||
@Override | ||
public void insertString (int offset, String s, AttributeSet attrSet) throws BadLocationException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this implementation disallow inputting negative numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As well as floating-point numbers, because of the '.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, this is indeed a bug, because my program is more restrictive, sorry, I will fix it for general purpose now
text field was fixed with swing on lwjgl3
then it can work on m1 osx and x86 windows11