IsmAvatar / LateralGM

A free Game Maker source file editor
http://lateralgm.org/
Other
96 stars 25 forks source link

Action List Focus Policy/DND #171

Closed egofree71 closed 1 year ago

egofree71 commented 10 years ago

Within the objects window, if the actions list panel doesn't have the focus, the keyboards shortcuts don't work. To reproduce the problem : just open a new objects window, and add directly new actions. It will not work. You have to select an action in the actions list panel.

RobertBColton commented 10 years ago

@egofree71 Partially fixed in https://github.com/IsmAvatar/LateralGM/commit/8209ec74aa59ff0112faaaf0824ed5fb9e5f08a8 http://enigma-dev.org/forums/index.php?topic=2269.msg23829#new

Move still does not maintain selection as it used to.

RobertBColton commented 9 years ago

@egofree71 This is still a different issue as far as the focus, we plan on adding cut/copy/paste and transferring of events between object frames, so which should get the focus by default? The action list or the event tree?

RobertBColton commented 9 years ago

Even with all of the above features now added. This is not that big of an issue, because it also exists in GM: Studio as I just tested in 1.4 the latest version and it also exists in every Swing program I can find. Tested GM 8.1 and it's the same problem there too. In fact, in every way I can test LGM it is behaving exactly the same as GM8.1 and GM: Studio and many other programs I've tested with drag and drop functionality. If you click the action list and focus it, then drag and drop an action, the list still has focus and the key events work, like I said, in every way I can think of, it works. https://docs.oracle.com/javase/tutorial/uiswing/examples/dnd/

I sort of consider this a general UI bug everywhere because if you check the official drag and drop demo's for Java too, dragging into a text area gives it focus but dragging onto a list does not give it focus. I can say that I believe a nice solution to this problem is to make the action list request focus when a DND tile is dropped on it. We can not make cut/copy/paste be attached to the whole editor because it should also work for the selected events (though I notice we have not added these shortcuts) it should also work for the name text field, so it cannot be global to the whole object frame.

@egofree71 I've gone through all of the Qt DND examples and they have the same issue, the list you drag from keeps the keyboard focus. So I'll have to test native Windows Forms and see if this is also the case. This really bothers me because all text controls grab focus once you drop into them. QT DND

While this may sound counter-intuitive, there may be people who want to insert to the action list from the drag and drop panel with the keyboard and keep the tabs in focus, GM don't allow this. It seems counter-intuitive because who would want to use the keyboard for "drag and dropping" which you know, implies dragging with the mouse. So I am not really sure what to do, though we are able to change the behavior since this is our own control.

RobertBColton commented 8 years ago

I just finished testing Construct and the "Add Event" options on its toolbar does give it's version of an action list keyboard focus. Stencyl is written in some esoteric and fundamentally flawed Java GUI framework (like all the others) so ofc it doesn't give keyboard focus, it doesn't even show focused buttons.

Construct 2 Drag & Drop