Skip to content

Conversation

@YoungOnionMC
Copy link
Member

What

cleans up the amount set widget for ae parts

Implementation Details

use a LongInputWidget instead of string and sanitization, use an actual background and label widgets instead of hard coding the amount text, shift around the widget grouping so its accessable

Outcome

easier to set the amount on all ae parts

@YoungOnionMC YoungOnionMC requested a review from a team as a code owner July 19, 2025 09:37
@YoungOnionMC YoungOnionMC added type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Jul 19, 2025
Copy link
Contributor

@jurrejelle jurrejelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never done UI bs so ideally someone else reviews it too, but apart from the tiny code cleanness nitpick, LGTM

if (this.index < 0) {
return "0";
public long getAmount() {
if (index < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very tiny nitpick, either use this.index both here and in setAmount, or just index in both <3

Copy link
Contributor

@screret screret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jurre's review too

this.amountSetWidget.setVisible(false);
this.amountSetWidget.getAmountText().setVisible(false);
init();
var asw = new AmountSetWidget(15, -53, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just do this.amountSetWidget = ... here?

Comment on lines +60 to +62
amountSetWidget.setSlotIndexClient(slotIndex);
amountSetWidget.setVisible(true);
amountSetWidget.getAmountText().setVisible(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the this. from all of these?

import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;

import java.awt.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hold up, what AWT class did you import? we can't use those because JREs don't have AWT by default

@YoungOnionMC YoungOnionMC marked this pull request as draft July 20, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants