Skip to content

Commit

Permalink
fix: a couple more small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Nov 28, 2023
1 parent 4344416 commit b3902a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ public boolean keyPressed(int keyCode, int scanCode, int modifier) {
if (keyCode == InputConstants.KEY_ESCAPE) {
titleEditBox.setValue(newTitle == null ? title.getString() : newTitle.getString());
showingTitleEdit = false;
return true;
} else {
return titleEditBox.keyPressed(keyCode, scanCode, modifier);
titleEditBox.keyPressed(keyCode, scanCode, modifier);
}
return true;
} else {
closeWithConfirmation();
return true;
Expand Down Expand Up @@ -441,7 +441,7 @@ public boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double
protected void renderDecorations(GuiGraphics guiGraphics, int pMouseX, int pMouseY) {
if (dragging != null) {
FilterEntry entry = getEntryAtPosition(pMouseX, pMouseY);
if (entry != null && entry.dumpedFilter.filter() != dragging) {
if (entry != null && entry.dumpedFilter.filter() != dragging.dumpedFilter.filter()) {
int w = font.width(dragging.dumpedFilter.filter().getDisplayName());
guiGraphics.fill(pMouseX, pMouseY - ELEMENT_HEIGHT / 2 + 1, pMouseX + w + 10, pMouseY + ELEMENT_HEIGHT / 2, 0xC0E1F1FD);
guiGraphics.renderOutline(pMouseX, pMouseY - ELEMENT_HEIGHT / 2 + 1, w + 10, ELEMENT_HEIGHT, 0xC0404040);
Expand Down Expand Up @@ -477,7 +477,7 @@ public FilterEntry(DumpedFilter dumpedFilter) {
public void render(GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean isMouseOver, float partialTick) {
int labelLeft = left + dumpedFilter.indent() * 10;
int yBase = top + height / 2;
if (dumpedFilter.filter() == dragTarget && dragging != dragTarget) {
if (dumpedFilter.filter() == dragTarget && dragging.dumpedFilter.filter() != dragTarget) {
guiGraphics.fill(labelLeft - 2, top - 3, labelLeft + font.width(getLabel()) + 2, top + font.lineHeight, 0xFFCAE9BE);
guiGraphics.renderOutline(labelLeft - 2, top - 3, font.width(getLabel()) + 4, font.lineHeight + 4, 0xFF306844);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public InteractionResultHolder<ItemStack> use(Level level, Player player, Intera

@Override
public void appendHoverText(ItemStack itemStack, @Nullable Level level, List<Component> list, TooltipFlag tooltipFlag) {
list.add(Component.translatable("item.ftbfiltersystem.smart_filter.tooltip").withStyle(ChatFormatting.GRAY));
list.add(Component.translatable("item.ftbfiltersystem.smart_filter.tooltip.1").withStyle(ChatFormatting.GRAY));
list.add(Component.translatable("item.ftbfiltersystem.smart_filter.tooltip.2").withStyle(ChatFormatting.GRAY));
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"ftbfiltersystem": "FTB Filter System",
"item.ftbfiltersystem.smart_filter": "Smart Filter",
"item.ftbfiltersystem.smart_filter.tooltip": "Right-click: configure filter\nSneak + Right-click: Test filter with item in off hand",
"item.ftbfiltersystem.smart_filter.tooltip.1": "Right-click: configure filter",
"item.ftbfiltersystem.smart_filter.tooltip.2": "Sneak + Right-click: Test filter with item in off hand",
"ftbfiltersystem.message.parse_failed": "Filter parse failure: %s",
"ftbfiltersystem.message.not_a_filter": "You must hold a Smart Filter in your main hand",
"ftbfiltersystem.message.no_offhand_item": "Hold an item to be tested in your off hand",
Expand All @@ -28,7 +29,7 @@
"filter.ftbfiltersystem.or.name": "Any Of",
"filter.ftbfiltersystem.or.tooltip": "Compound filter: this filter matches if ANY of its child filters match.",
"filter.ftbfiltersystem.not.name": "Not",
"filter.ftbfiltersystem.not.tooltip": "Compound filter: this filter matches if its child filter does NOT match. At most child can be added.",
"filter.ftbfiltersystem.not.tooltip": "Compound filter: this filter matches if its child filter does NOT match. At most one child can be added.",
"filter.ftbfiltersystem.only_one.name": "Only One Of",
"filter.ftbfiltersystem.only_one.tooltip": "Compound filter: this filter matches if exactly ONE of its child filters matches.",
"filter.ftbfiltersystem.block.name": "Is Block",
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit b3902a9

Please sign in to comment.