-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Item Filter GUI No widgets to actually edit, those will be in the next commit * chore: spotless * chore: Merge fixes * feat: Add widgets * chore: Merge fixes * feat: Add remove button to string and numeric widgets * feat: Add text when no widgets * chore: Add missing @OVERRIDES * refactor: Cleanup FontRenderer changes * refactor: Rename FilterWidgetFactory and remove String case * fix: Fix SkillStatProvider not providing the correct skill * refactor: ItemProvider returns a single value * fix: Fix RarityStatProvider sorting by name, not by enum order * feat: Make provider name case-insensitive for filtering/sorting * feat: Add helper for accessing the filter ui in guides * chore: Fix profession description --------- Co-authored-by: Kristof <49001742+kristofbolyai@users.noreply.github.com>
- Loading branch information
1 parent
171a012
commit ec77450
Showing
88 changed files
with
4,813 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
common/src/main/java/com/wynntils/screens/base/widgets/ItemFilterUIButton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright © Wynntils 2024. | ||
* This file is released under LGPLv3. See LICENSE for full license details. | ||
*/ | ||
package com.wynntils.screens.base.widgets; | ||
|
||
import com.wynntils.screens.itemfilter.ItemFilterScreen; | ||
import com.wynntils.services.itemfilter.type.ItemProviderType; | ||
import com.wynntils.utils.mc.McUtils; | ||
import java.util.List; | ||
import net.minecraft.client.gui.components.Tooltip; | ||
import net.minecraft.client.gui.screens.Screen; | ||
import net.minecraft.network.chat.Component; | ||
|
||
public class ItemFilterUIButton extends WynntilsButton { | ||
private final SearchWidget searchWidget; | ||
private final Screen previousScreen; | ||
private final boolean supportsSorting; | ||
private final List<ItemProviderType> supportedProviderTypes; | ||
|
||
public ItemFilterUIButton( | ||
int x, | ||
int y, | ||
SearchWidget searchWidget, | ||
Screen previousScreen, | ||
boolean supportsSorting, | ||
List<ItemProviderType> supportedProviderTypes) { | ||
super(x, y, 20, 20, Component.literal("✎")); | ||
this.searchWidget = searchWidget; | ||
this.previousScreen = previousScreen; | ||
this.supportsSorting = supportsSorting; | ||
this.supportedProviderTypes = supportedProviderTypes; | ||
this.setTooltip(Tooltip.create(Component.translatable("screens.wynntils.itemSearchButton.tooltip"))); | ||
} | ||
|
||
@Override | ||
public void onPress() { | ||
McUtils.mc() | ||
.setScreen( | ||
ItemFilterScreen.create(searchWidget, previousScreen, supportsSorting, supportedProviderTypes)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.