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 c2acf6f commit 04b9780
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 @@ -13,7 +13,7 @@ loader_version_range=[4,)
mod_id=sophisticatedstorage
mod_name=Sophisticated Storage
mod_license=GNU General Public License v3.0
mod_version=0.10.53
mod_version=0.10.54
mod_group_id=sophisticatedstorage
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional storage containers.
Expand All @@ -35,7 +35,7 @@ jade_cf_file_id=5109393
chipped_cf_file_id=5506938
resourcefullib_cf_file_id=5483169
athena_cf_file_id=5431579
sc_version=[1.21-0.6.50,1.22)
sc_version=[1.21-0.7.4,1.22)
sb_version=[1.21,1.22)

#publish
Expand Down
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 04b9780

Please sign in to comment.