fix few oversights
This commit is contained in:
parent
096a5e764a
commit
5ee6a0100c
3 changed files with 14 additions and 11 deletions
|
|
@ -204,8 +204,11 @@ public class Modifiers {
|
||||||
MutableComponent res = null;
|
MutableComponent res = null;
|
||||||
if (modifierTiers.size() > 1) {
|
if (modifierTiers.size() > 1) {
|
||||||
res = rangeComponent(atrName, atr, atrGenerator, minConfig, maxConfig);
|
res = rangeComponent(atrName, atr, atrGenerator, minConfig, maxConfig);
|
||||||
|
if (res != null) {
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
if (res == null && minConfigDisplay != null) {
|
}
|
||||||
|
if (minConfigDisplay != null) {
|
||||||
res = minConfigDisplay.withStyle(atr.getReader().getColoredTextStyle());
|
res = minConfigDisplay.withStyle(atr.getReader().getColoredTextStyle());
|
||||||
if (minConfig instanceof AbilityLevelAttribute.Config minConfigAbility) {
|
if (minConfig instanceof AbilityLevelAttribute.Config minConfigAbility) {
|
||||||
return abilityLvlComponent(res, atr, minConfigAbility);
|
return abilityLvlComponent(res, atr, minConfigAbility);
|
||||||
|
|
|
||||||
|
|
@ -211,10 +211,10 @@ public class GearModifierScreen extends AbstractElementScreen {
|
||||||
.layout(this.translateWorldSpatial());
|
.layout(this.translateWorldSpatial());
|
||||||
NineSliceButtonElement<?> btnMinus =
|
NineSliceButtonElement<?> btnMinus =
|
||||||
new NineSliceButtonElement<>(Spatials.positionXY(this.getGuiSpatial().width() - 72 - 13, 35).size(15, 14),
|
new NineSliceButtonElement<>(Spatials.positionXY(this.getGuiSpatial().width() - 72 - 13, 35).size(15, 14),
|
||||||
ScreenTextures.BUTTON_EMPTY_TEXTURES, lvlInput::increment).layout(this.translateWorldSpatial());
|
ScreenTextures.BUTTON_EMPTY_TEXTURES, lvlInput::decrement).layout(this.translateWorldSpatial());
|
||||||
NineSliceButtonElement<?> btnPlus =
|
NineSliceButtonElement<?> btnPlus =
|
||||||
new NineSliceButtonElement<>(Spatials.positionXY(this.getGuiSpatial().width() - 25 - 13, 35).size(15, 14),
|
new NineSliceButtonElement<>(Spatials.positionXY(this.getGuiSpatial().width() - 25 - 13, 35).size(15, 14),
|
||||||
ScreenTextures.BUTTON_EMPTY_TEXTURES, lvlInput::decrement).layout(this.translateWorldSpatial());
|
ScreenTextures.BUTTON_EMPTY_TEXTURES, lvlInput::increment).layout(this.translateWorldSpatial());
|
||||||
this.addElement(btnMinus);
|
this.addElement(btnMinus);
|
||||||
this.addElement(minusLabel);
|
this.addElement(minusLabel);
|
||||||
this.addElement(plusLabel);
|
this.addElement(plusLabel);
|
||||||
|
|
@ -270,8 +270,8 @@ public class GearModifierScreen extends AbstractElementScreen {
|
||||||
if (keyCode == InputConstants.KEY_TAB && hasShiftDown()) {
|
if (keyCode == InputConstants.KEY_TAB && hasShiftDown()) {
|
||||||
switchTab((currIndex - 1 + Items.getVaultGearItems().size()) % Items.getVaultGearItems().size());
|
switchTab((currIndex - 1 + Items.getVaultGearItems().size()) % Items.getVaultGearItems().size());
|
||||||
}
|
}
|
||||||
// alt to toggle legendary
|
// ctrl to change tier increase (normal, greater, legendary)
|
||||||
if (keyCode == InputConstants.KEY_LALT || keyCode == InputConstants.KEY_RALT) {
|
if (keyCode == InputConstants.KEY_LCONTROL || keyCode == InputConstants.KEY_RCONTROL) {
|
||||||
toggleLegend();
|
toggleLegend();
|
||||||
}
|
}
|
||||||
// ctrl + , to toggle compact +lvl to abilities
|
// ctrl + , to toggle compact +lvl to abilities
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,11 @@ import net.minecraft.client.gui.Font;
|
||||||
public class ScrollableLvlInputElement extends TextInputElement<ScrollableLvlInputElement> {
|
public class ScrollableLvlInputElement extends TextInputElement<ScrollableLvlInputElement> {
|
||||||
public ScrollableLvlInputElement(ISpatial spatial, Font font) {
|
public ScrollableLvlInputElement(ISpatial spatial, Font font) {
|
||||||
super(spatial, font);
|
super(spatial, font);
|
||||||
|
this.adjustEditBox(editBox -> {
|
||||||
|
editBox.setFilter(s -> isValidLevel(parseInt(s)));
|
||||||
|
editBox.setMaxLength(3);
|
||||||
|
editBox.setValue(String.valueOf(VaultBarOverlay.vaultLevel));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -22,11 +27,6 @@ public class ScrollableLvlInputElement extends TextInputElement<ScrollableLvlInp
|
||||||
this.setInput(String.valueOf(val));
|
this.setInput(String.valueOf(val));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this.adjustEditBox(editBox -> {
|
|
||||||
editBox.setFilter(s -> isValidLevel(parseInt(s)));
|
|
||||||
editBox.setMaxLength(3);
|
|
||||||
editBox.setValue(String.valueOf(VaultBarOverlay.vaultLevel));
|
|
||||||
});
|
|
||||||
return super.onMouseScrolled(mouseX, mouseY, delta);
|
return super.onMouseScrolled(mouseX, mouseY, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue