mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
fc terminal add type filter (#98)
* fc terminal add type filter * Update dependencies.gradle --------- Co-authored-by: Raven Szewczyk <[email protected]>
This commit is contained in:
1 parent
c92f8bdd7c
commit
b9724d9369
10 files changed
+70
-1
No files matched your search
@@ -84,6 +84,7 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
protected GuiImgButton searchBoxSettings;
|
||||
protected GuiImgButton terminalStyleBox;
|
||||
protected GuiImgButton searchStringSave;
|
||||
protected GuiImgButton typeFilter;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public FCGuiMonitor(final InventoryPlayer inventoryPlayer, final ITerminalHost te, final FCContainerMonitor<T> c) {
|
||||
@@ -228,6 +229,15 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
this.configSrc.getSetting(Settings.VIEW_MODE)));
|
||||
this.offsetY += 20;
|
||||
}
|
||||
if (ModAndClassUtil.isTypeFilter && this instanceof GuiItemMonitor) {
|
||||
this.buttonList.add(
|
||||
this.typeFilter = new GuiImgButton(
|
||||
this.guiLeft - 18,
|
||||
this.offsetY,
|
||||
Settings.TYPE_FILTER,
|
||||
this.configSrc.getSetting(Settings.TYPE_FILTER)));
|
||||
this.offsetY += 20;
|
||||
}
|
||||
|
||||
this.buttonList.add(
|
||||
this.SortDirBox = new GuiImgButton(
|
||||
@@ -658,6 +668,11 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
return this.configSrc.getSetting(Settings.VIEW_MODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enum getTypeFilter() {
|
||||
return this.configSrc.getSetting(Settings.TYPE_FILTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
if (this.SortByBox != null) {
|
||||
@@ -671,6 +686,9 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
if (this.ViewBox != null) {
|
||||
this.ViewBox.set(this.configSrc.getSetting(Settings.VIEW_MODE));
|
||||
}
|
||||
if (this.typeFilter != null) {
|
||||
this.typeFilter.set(this.configSrc.getSetting(Settings.TYPE_FILTER));
|
||||
}
|
||||
|
||||
this.repo.updateView();
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseCo
|
||||
this.clientCM.registerSetting(Settings.SORT_BY, SortOrder.NAME);
|
||||
this.clientCM.registerSetting(Settings.VIEW_MODE, ViewItems.ALL);
|
||||
this.clientCM.registerSetting(Settings.SORT_DIRECTION, SortDir.ASCENDING);
|
||||
this.clientCM.registerSetting(Settings.TYPE_FILTER, TypeFilter.ALL);
|
||||
}
|
||||
|
||||
public IMEMonitor<T> getMonitor() {
|
||||
|
||||
Reference in new issue
Block a user