Skip to content

Commit

Permalink
feat: ✨ Added storage search functionality
Browse files Browse the repository at this point in the history
- magnifying glass next to sort buttons opens search box
- can search by item name or using @ prefix by mod names as well
- by default automatically prefills search phrase that was in the search box last time a storage gui was closed
- in settings this can be turned on / off for all player storages or on / off per individual storage (remembers last phrase used for that given storage and only prefills there)
  • Loading branch information
P3pp3rF1y committed Nov 15, 2024
1 parent 2182eff commit 8d24dfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version_range=[4,)
mod_id=sophisticatedbackpacks
mod_name=Sophisticated Backpacks
mod_license=GNU General Public License v3.0
mod_version=3.20.19
mod_version=3.20.20
mod_group_id=sophisticatedbackpacks
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional backpacks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AnvilUpgradeTab extends UpgradeSettingsTab<AnvilUpgradeContainer> {
public AnvilUpgradeTab(AnvilUpgradeContainer upgradeContainer, Position position, StorageScreenBase<?> screen) {
super(upgradeContainer, position, screen, SBPTranslationHelper.INSTANCE.translUpgrade("anvil"), SBPTranslationHelper.INSTANCE.translUpgradeTooltip("anvil"));
openTabDimension = new Dimension(103, 92);
itemNameTextBox = new TextBox(new Position(x + 6, y + 27), new Dimension(84, 13)) {
itemNameTextBox = new TextBox(new Position(x + 5, y + 25), new Dimension(90, 14)) {
@Override
public boolean mouseClicked(double mouseX, double mouseY, int button) {
if (isEditable()) {
Expand All @@ -42,7 +42,7 @@ protected void renderBg(GuiGraphics guiGraphics, Minecraft minecraft, int mouseX
super.renderBg(guiGraphics, minecraft, mouseX, mouseY);
TextureBlitData textureBlitData = getContainer().getSlots().get(0).hasItem() ? EDIT_ITEM_NAME_BACKGROUND : EDIT_ITEM_NAME_BACKGROUND_DISABLED;

GuiHelper.blit(guiGraphics, getX() - 4, getY() - ((getHeight() - 8) / 2) - 1, textureBlitData, getWidth() + 12, getHeight() + 2);
GuiHelper.blit(guiGraphics, getX() - 2, getY() - 2, textureBlitData, getWidth() + 4, getHeight() + 2);
}
};

Expand Down

0 comments on commit 8d24dfd

Please sign in to comment.