KeyListeners for the game doesn't work anymore as soon as I add a chat panel - chat

I'm currently integrating a ChatPanel into a MMORPG. The Problem is, despite I change focus, that the GamePanel doesn't recognize KeyEvents anymore when I add the ChatPanel to the Frame.
Could it be, that the TextField in the ChatPanel surpasses the KeyListeners in the GamePanel?

Related

Set mouse cursor behavior globally

I'm currently developing a windows app with flutter. I experienced that the default mouse cursor changes when hovering over a button that is clickable or shows an "forbidden" sign if a button is deactivated. This does not feel right for me and I think in most Windows programs there is just the standard cursor.
I know about the MouseRegion class where I can set the cursor for one button. Is there a way to change the cursor globally for the entire application?
In my opinion, overall, the cursor topic is still in progress for Flutter. We have been developing a Desktop application for almost two years now and I can definitely tell that, there is a progress but still it is a problem.
What we do most of the time is to create our own buttons and arrange all of them together.
However, to answer your question :) Assuming that you are using new material buttons on the latest Flutter version, in the new Material Buttons shared here. You can see that, ButtonStyle class has a field called final MaterialStateProperty<MouseCursor> mouseCursor; which is the mouseCursor that you can use for your own buttons.

TalkBack announces "Double tap and hold to long press" on WebView

Background:
When focused on a WebView control, TalkBack announces something to the effect of "Bing. WebView. Double tap and hold to long press" (note that focus is on the WebView control itself, not the content within the webview). However, as best I can tell, double tap and long pressing doesn't seem to do anything other than pass TalkBack focus into a control within the WebView itself. Our team has testers that specialize in accessibility which filed a bug on us for this "Double tap and hold to long press" announcement. The rationale within the bug states that since this action doesn't appear to do anything, the announcement will only serve to confuse TalkBack users.
This announcement doesn't appear to be specific to our app as I was able to reproduce this behavior on a new, blank Android app with a WebView that points to Google (there it announces "Google. WebView. Double tap and hold to long press"). As I think it helps show what focus I'm talking about, I have added a screenshot of the prototype app I built with the green TalkBack focus indicator below:
Questions:
Is there a reason for why Android insists on announcing the "double tap and hold to long press" piece for a WebView? If there is a functional reason for this, then any attempt to fix this issue may be moot.
Does anyone know of a way to stop TalkBack from reading the "double tap and long press"? Alternatively, is there a way to hide the WebView control itself from TalkBack without hiding the html content within?
What I've tried:
Unfortunately saw no luck setting isLongClickable to false, setting empty onLongClickListeners, and worked with a few of the suggestions in the stackoverflows here, here, here, and here. I tried all of the mentioned changes on a blank app to reduce the possibility that the complexities of our production app has interfered with the experiments I was running. Setting the ImportantForAccessibility field to "No" hides all of the inner html of the webview from Talkback so that is not an option either.
Sidenote that I find interesting: in my experimentation, I also tried setting the WebView's isClickable property to false and yet it was still clickable. So I am wondering if I am possibly focusing on setting properties on the wrong control (or if Android just completely ignores those properties on a WebView control).

focus() not working after Popover closed in material ui

I can't figure out why I can't programmatically focus an input html element (part of a Material UI TextField) once I've opened a Popover that steals the focus. I can programmatically focus before I open the Popover but once I close it then I can no longer programmatically focus the input element that belongs to the Textfield.
Can someone help me? I’m not able to use autoFocus on the Textfield because I’ve built it as part of a grid so I need a way to force focus programmatically back to the Textfield
Thanks,
Adam
Solved this by making sure I always got the latest element when attempting to focus. Turns out I was trying to programmatically focus an element in the DOM that no longer existed after React re-rendered the component

Tab Key Stops Moving Between Input Fields

For the time being, this is a Material-UI question.
I have a situation where the tab key ceases to move the text cursor between TextFields. At the moment, I have no idea where in my code this is happening, and I am hoping someone can point me in the right direction so I can start looking.
Here’s the setup:
A mouse click causes a Dialog to be displayed. The Dialog has
several TextFields as well as 2 FlatButtons, “cancel & “submit”
At this state, tabbing between fields works as expected.
If I hit the “cancel” button, an event is fired which updates state (including the display of the Dialog) and the Dialog is closed. I can repeat the process from the top with no issues.
If I hit the “submit” button, an event is fired which does some async stuff (using rxjs epics).
On success, the epic fires an event which updates the state (including the display of the Dialog)
If I now try to repeat the process from the top, the tab key does not respond.
I am in the process of migrating to v1, and checked some of the v0.* components – they have the same problem – I don’t recall that being an issue before… Possible conflict between the two versions of the library?
Figured it out. Yes, there is a conflict between the v0.20 and v1.0 of the Dialog component. At least when you have one opening on top of another. Having changed all Dialogs to v1.0, the problem disappeared.
By the way, its not that the tab key wasn't responding - it was responding in the lower Dialog component and not in the top (latest to be created) one. This problem disappeared once the same version was used for both.

How to change a unity UI Button's state in code?

I'm now using unity 4.6,the new UI system , since i won't use mouse to control my game,could anyone tell me how can i change a button's state in script ?
I would recommend you to start by trying to make your system work with keyboard, using the UI navigation system.
http://docs.unity3d.com/Manual/script-SelectableNavigation.html
You could manually set a button to selected state by using EventSystem.Current.SetCurrentlySelectedGameobject(yourGameObject);
If this button has an onLeft/OnRight etc. value setted, you will be able to interact with it with input Horizontal vertical axis, and to press it with a "Submit" value in input manager.
Once you're happy with it, you should try to catch your kinnect gestures and use them to send correct events I guess.