mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 03:25:38 +00:00
Create JEI-like Advanced Search (#485)
* Create JEI like Search * add subfilter * fix extended search pattern * fix search crash without prefixes * fix unicode case in search * add regexp to extended patternMode * move autofocus config to seatch widget panel * code refactoring * add matching language to searh parser * fix type * fix modname search * clean cache after add new provider --------- Co-authored-by: slprime <[email protected]> Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
34 files changed
+1233
-291
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package codechicken.nei;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import codechicken.nei.api.ItemFilter;
|
||||
@@ -14,6 +15,14 @@ public abstract class RecipeSearchField extends TextField {
|
||||
this.field.setVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initInternalTextField() {
|
||||
field = new FormattedTextField(Minecraft.getMinecraft().fontRenderer, 0, 0, 0, 0);
|
||||
((FormattedTextField) field).setFormatter(new SearchTextFormatter(SearchField.searchParser));
|
||||
field.setMaxStringLength(maxSearchLength);
|
||||
field.setCursorPositionZero();
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return this.field.getVisible();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user