diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-08-24 04:00:09 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-08-24 04:02:20 +0800 |
| commit | a4776b33fd86731249cf9b02c2ea6fff1bce9350 (patch) | |
| tree | dce3018ebe26603404f68e5b53a77f5d10269a41 /runtime | |
| parent | 03e733a4efcdc51b71377273b251c01a4888022d (diff) | |
| download | RoughlyEnoughItems-a4776b33fd86731249cf9b02c2ea6fff1bce9350.tar.gz RoughlyEnoughItems-a4776b33fd86731249cf9b02c2ea6fff1bce9350.tar.bz2 RoughlyEnoughItems-a4776b33fd86731249cf9b02c2ea6fff1bce9350.zip | |
Make Add button of favorites menu more visible
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java index 7af03436f..e89ff560e 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/FavoritesListWidget.java @@ -766,18 +766,18 @@ public class FavoritesListWidget extends WidgetWithBounds implements DraggableSt @Override protected boolean isAvailable(int mouseX, int mouseY) { float expendProgress = widget.favoritePanel.expendState.floatValue(); - return widget.fullBounds.contains(mouseX, mouseY) || expendProgress > .1f; + return widget.fullBounds.contains(mouseX, mouseY) || REIRuntime.getInstance().getOverlay().orElseThrow().getEntryList().containsMouse(new Point(mouseX, mouseY)) || expendProgress > .1f; } @Override protected void renderButtonText(PoseStack matrices, MultiBufferSource.BufferSource bufferSource) { float expendProgress = widget.favoritePanel.expendState.floatValue(); if (expendProgress < .9f) { - int textColor = 0xFFFFFF | (Math.round(0xef * alpha.floatValue() * (1 - expendProgress)) << 24); + int textColor = 0xFFFFFF | (Math.round(0xFF * alpha.floatValue() * (1 - expendProgress)) << 24); font.drawInBatch("+", bounds.getCenterX() - 2.5f, bounds.getCenterY() - 3, textColor, false, matrices.last().pose(), bufferSource, false, 0, 15728880); } if (expendProgress > .1f) { - int textColor = 0xFFFFFF | (Math.round(0xef * alpha.floatValue() * expendProgress) << 24); + int textColor = 0xFFFFFF | (Math.round(0xFF * alpha.floatValue() * expendProgress) << 24); font.drawInBatch("-", bounds.getCenterX() - 2.5f, bounds.getCenterY() - 3, textColor, false, matrices.last().pose(), bufferSource, false, 0, 15728880); } } @@ -800,7 +800,7 @@ public class FavoritesListWidget extends WidgetWithBounds implements DraggableSt boolean hovered = containsMouse(mouseX, mouseY); this.alpha.setTo(hovered ? 1f : isAvailable(mouseX, mouseY) ? 0.3f : 0f, 260); this.alpha.update(delta); - int buttonColor = 0xFFFFFF | (Math.round(0x34 * alpha.floatValue()) << 24); + int buttonColor = 0xFFFFFF | (Math.round(0x74 * alpha.floatValue()) << 24); fillGradient(matrices, bounds.x, bounds.y, bounds.getMaxX(), bounds.getMaxY(), buttonColor, buttonColor); if (isVisible()) { MultiBufferSource.BufferSource bufferSource = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder()); |
