Focusable search, with clicking and key bindings #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I apologize in advance for any formatting issues that Windows + Eclipse has caused.
The GUI for Easy Crafting Table has the search bar as default off. If
you press the key binding to focus the search bar (default 'F') the
search bar will focus. If you click on anywhere but the search bar, you
will lose focus but your search content will be saved. If you right
click on the search bar the entire search bar will be emptied. If the
search bar is focused the escape key will clear the search bar and
remove focus. Pressing escape again will close the gui. Also holding
doing the escape key will close the gui.
Should probably make a config to set a default whether the search bar
should be focused on open or not.
Added a tab to easy crafting. Maybe make this tab part of the config?
Other things to consider:
-The server (probably client as well) has major duplication bugs when
shift clicking an item that already exists on your inventory. If you
have 9 diamonds and you shift click the option to craft nine diamonds,
you will generate an entire stack of diamonds. I recommend better safe
checking, but I cannot easily make out how the recipe handler works
without rewriting most of it. I highly recommend lepko take a look at
this.
-Using a small amount of mods is ok for the crafting table. However when
using a large amount of mods the crafting table will be ok unless you
have a lot of ingredients in your inventory. This could probably be
fixed by a lazy loader. Instead of waiting for the recipe handler to
load all new possible crafts, update the list every so often. Again, I
would do this if I could make sense of the handler, but alas would
probably be too much work, also recommend lepko to take a look at this.
-I didn't touch the Auto crafting table because personally I don't use
it so I have no idea how it works. I don't think I ever opened it
either. Anyone is welcome to move changes made to GuiEasyCrafting to
GuiAutoCrafting.
Fixes issue #39