Skip to content

Commit 4803040

Browse files
authored
Merge pull request #75 from sylviameows/main
fix code palette tabs (haven't tested it lmao)
2 parents 1dedf12 + 3eafebe commit 4803040

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/dev/dfonline/codeclient/dev/menu/DevInventory/DevInventoryGroup.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public boolean isTopHalf() {
227227
}
228228

229229
public int getPlace() {
230-
return this.index - (isTopHalf() ? 0 : TOP_HALF - 1);
230+
return this.index;
231231
}
232232

233233
public int getColumn() {
@@ -244,7 +244,7 @@ public int getDisplayX(int originX) {
244244

245245
public int getDisplayY(int originY, int menuHeight) {
246246
int multiplier = TAB_HEIGHT * (isTopHalf() ? -1 : 1);
247-
int y = (getRow() * multiplier) + originY + (isTopHalf() ? (TAB_HEIGHT * -1 - 4) : menuHeight);
247+
int y = originY + (isTopHalf() ? (TAB_HEIGHT * -1 - 4) + (getRow() * multiplier) : menuHeight);
248248
return y;
249249
}
250250

0 commit comments

Comments
 (0)