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 bda7453 commit 044401e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.daemon=false

mod_id=sophisticatedstorage
mod_group_id=sophisticatedstorage
mod_version=0.10.48
mod_version=0.10.49
sonar_project_key=sophisticatedstorage:SophisticatedStorage
github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedStorage

Expand All @@ -30,6 +30,6 @@ jade_cf_file_id=4614153
chipped_cf_file_id=5077656
resourcefullib_cf_file_id=5070629
athena_cf_file_id=4764357
sc_version=[1.20.1-0.6.36,1.20.4)
sc_version=[1.20.1-0.7.3,1.20.4)
sb_version=[1.20.1-3.20.5,1.20.4)
parchment_version=2023.09.03-1.20.1
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void renderBar(GuiGraphics guiGraphics, int x, int y, float percentage,

guiGraphics.blit(barTexture.getTextureName(), x, y + yOffset, barTexture.getU(), barTexture.getV() + yOffset, barTexture.getWidth(), barHeight, barTexture.getTextureWidth(), barTexture.getTextureHeight());

String text = String.valueOf((int) (percentage * 100)) + "%";
String text = (int) (percentage * 100) + "%";
int percentageX = x;
if (left) {
percentageX -= 2 + minecraft.font.width(text);
Expand All @@ -147,4 +147,9 @@ private void renderBar(GuiGraphics guiGraphics, int x, int y, float percentage,
protected boolean shouldShowSortButtons() {
return false;
}

@Override
protected void addSearchBox() {
// No search box for limited barrels
}
}

0 comments on commit 044401e

Please sign in to comment.