You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EMI offers the EmiDragDropHandler API for moving ghost items into appropriate slots via drag & drop. I'd like to propose adding another API that does something similar but without requiring drag & drop.
My background and use case: AE2 allows setting up filtering for certain items, such as partitioning storage cells, filtering import & export busses etc. These filters can be set using different methods:
Clicking with an item in hand on the filter slot
Drag & drop from EMI
Quick move (shift-click) from player inventory
A typical storage cell can have up to 63 filter slots and filling them one by one with drag & drop from EMI is a tedious and error-prone process. Allowing to shift-click ghost items from EMI directly would greatly speed up the process and other mods could also benefit from such a feature.
I've implemented a quick and dirty proof of concept both on the EMI and the AE2 side of things to make a video of the use case. In the video you can first see the manual drag & drop approach, then the new keybind and at last the newer and faster shift-click variant:
quick-move.mp4
My quick and dirty approach for the proof of concept on the EMI side can be seen here (Mithi83@1c99ec0) and it involves:
Adding a keybind for the quick move (shift + left click)
Adding a new else if in EmiScreenManager.stackInteraction to handle the
new keybind
Abusing the existing EmiDragDropHandlers.dropStack API with x=9999 and y=9999 to transport the information that it should be considered a quick move rather than a real drag & drop operation across the API and into AE2
Now I'm wondering how to make this proof of concept into a proper feature. Since I'm not that familiar with designing APIs in Java (in particular the backward compatibility question) I've decided to make it a feature request to discuss it rather than just posting a pull request.
Since the feature is very similar to the drag & drop approach my first idea was to add another function to EmiDragDropHandler along the lines of boolean quickMoveStack(T screen, EmiIngredient stack). There are some questions or drawbacks however:
The name EmiDragDropHandler does not cover quick move.
I'm not sure if this would affect backwards compatibility of existing users of that API if there was a default boolean quickMoveStack(T screen, EmiIngredient stack) { return false; } in there.
I'm not sure what would be a good wording for that feature. In my mind 'quick move' sounds good, but I'm not sure if that is the official terminology here.
The alternative would be a separate class for the API, e.g. EmiQuickMoveHandler which would probably avoid these problems. Either way I'd be willing to provide a pull request if a lack of time on your end would be the bottleneck here once the basic questions have been answered. Thanks for your time and a great mod.
The text was updated successfully, but these errors were encountered:
EMI offers the
EmiDragDropHandler
API for moving ghost items into appropriate slots via drag & drop. I'd like to propose adding another API that does something similar but without requiring drag & drop.My background and use case: AE2 allows setting up filtering for certain items, such as partitioning storage cells, filtering import & export busses etc. These filters can be set using different methods:
A typical storage cell can have up to 63 filter slots and filling them one by one with drag & drop from EMI is a tedious and error-prone process. Allowing to shift-click ghost items from EMI directly would greatly speed up the process and other mods could also benefit from such a feature.
I've implemented a quick and dirty proof of concept both on the EMI and the AE2 side of things to make a video of the use case. In the video you can first see the manual drag & drop approach, then the new keybind and at last the newer and faster shift-click variant:
quick-move.mp4
My quick and dirty approach for the proof of concept on the EMI side can be seen here (Mithi83@1c99ec0) and it involves:
else if
in EmiScreenManager.stackInteraction to handle thenew keybind
EmiDragDropHandlers.dropStack
API with x=9999 and y=9999 to transport the information that it should be considered a quick move rather than a real drag & drop operation across the API and into AE2Now I'm wondering how to make this proof of concept into a proper feature. Since I'm not that familiar with designing APIs in Java (in particular the backward compatibility question) I've decided to make it a feature request to discuss it rather than just posting a pull request.
Since the feature is very similar to the drag & drop approach my first idea was to add another function to
EmiDragDropHandler
along the lines ofboolean quickMoveStack(T screen, EmiIngredient stack)
. There are some questions or drawbacks however:EmiDragDropHandler
does not cover quick move.default boolean quickMoveStack(T screen, EmiIngredient stack) { return false; }
in there.The alternative would be a separate class for the API, e.g.
EmiQuickMoveHandler
which would probably avoid these problems. Either way I'd be willing to provide a pull request if a lack of time on your end would be the bottleneck here once the basic questions have been answered. Thanks for your time and a great mod.The text was updated successfully, but these errors were encountered: