Skip to content

Commit 3d1f7eb

Browse files
committed
fix #44
1 parent 26693fe commit 3d1f7eb

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ if (hasProperty("CURSEFORGE_TOKEN") && curseforgeId.isNotEmpty()) {
147147

148148
id = curseforgeId
149149
releaseType = "release"
150-
addGameVersion("1.19")
151-
addGameVersion("1.19.1")
152-
addGameVersion("1.19.2")
150+
addGameVersion("1.19.3")
153151
addGameVersion("Fabric")
154152
addGameVersion("Java 17")
155153

src/client/java/dev/isxander/yacl/gui/controllers/ColorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected void setSelectionLength() {
184184
}
185185

186186
@Override
187-
protected int getDefaultCarotPos() {
187+
protected int getDefaultCaretPos() {
188188
return colorController.allowAlpha() ? 3 : 1;
189189
}
190190

src/client/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected void drawValueText(MatrixStack matrices, int mouseX, int mouseY, float
5454
matrices.push();
5555
int textX = getDimension().xLimit() - textRenderer.getWidth(valueText) + renderOffset - getXPadding();
5656
matrices.translate(textX, getTextY(), 0);
57-
GuiUtils.enableScissor(inputFieldBounds.x(), inputFieldBounds.y(), inputFieldBounds.width() + 1, inputFieldBounds.height() + 2);
57+
GuiUtils.enableScissor(inputFieldBounds.x(), inputFieldBounds.y() - 2, inputFieldBounds.width() + 1, inputFieldBounds.height() + 4);
5858
textRenderer.drawWithShadow(matrices, valueText, 0, 0, getValueColor());
5959
matrices.pop();
6060

@@ -90,7 +90,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
9090
inputFieldFocused = true;
9191

9292
if (!inputFieldBounds.isPointInside((int) mouseX, (int) mouseY)) {
93-
caretPos = getDefaultCarotPos();
93+
caretPos = getDefaultCaretPos();
9494
} else {
9595
// gets the appropriate caret position for where you click
9696
int textX = (int) mouseX - (inputFieldBounds.xLimit() - textRenderer.getWidth(getValueText()));
@@ -99,7 +99,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
9999
for (char ch : inputField.toCharArray()) {
100100
pos++;
101101
int charLength = textRenderer.getWidth(String.valueOf(ch));
102-
if (currentWidth + charLength / 2 > textX) { // if more than half way past the characters select in front of that char
102+
if (currentWidth + charLength / 2 > textX) { // if more than halfway past the characters select in front of that char
103103
caretPos = pos;
104104
break;
105105
} else if (pos == inputField.length() - 1) {
@@ -119,7 +119,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
119119
return false;
120120
}
121121

122-
protected int getDefaultCarotPos() {
122+
protected int getDefaultCaretPos() {
123123
return inputField.length();
124124
}
125125

0 commit comments

Comments
 (0)