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 16, 2024
1 parent 43f8465 commit f01d354
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 @@ -3,7 +3,7 @@ org.gradle.daemon=false

mod_id=sophisticatedbackpacks
mod_group_id=sophisticatedbackpacks
mod_version=3.20.12
mod_version=3.20.13
sonar_project_key=sophisticatedbackpacks:SophisticatedBackpacks
github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedBackpacks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 pMouseX, double pMouseY, int pButton) {
if (isEditable()) {
Expand All @@ -48,7 +48,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 f01d354

Please sign in to comment.