Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 40 additions & 10 deletions src/main/java/page/battle/BattleBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,28 @@ private void drawLineupWithTwoRows(FakeGraphics g, int w, int h, float hr, float
int dw = (int) (hr * 10);
int dh = (int) (hr * 12);

float cd = 1f * cool / sb.elu.maxC[i][j];
float cooldownscalar = 1f * cool / sb.elu.maxC[i][j];
cooldownscalar = 1f - cooldownscalar;

int xw = (int) (cd * (iw - dw * 2));
int xw2 = (int) (iw - dw * 2);
int xwidth = (int) (iw - dw * 2);
int startX = x + iw - dw - xwidth;
int startY = y + ih - dh * 2;

g.colRect(x + iw - dw - xw2, y + ih - dh * 2, xw2, dh, 0, 0, 0, -1);
g.colRect((x + dw + 2f), (y + ih - dh * 2) + 2f, (iw - dw * 2 - xw) - 4, dh - 4, 0, 255, 255, -1);
boolean full = (h >= 500); // not sure how to get the BattleInfoPage from this, so this is a 'temporary' workaround that breaks on small window sizes

boolean windowTooSmall = (h < 200); // see if the window is really small to not break the drawing
// really small windows break lots of BCU drawing anyways, but it's worth it to check

g.colRect(startX, startY, xwidth, dh, 0, 0, 0, -1); // background draw black square
if (full) {
g.colRect(startX + 2, startY + 2, (xwidth - 4) * cooldownscalar, dh - 4, 0, 255, 255, -1);
} else {
if (windowTooSmall) {
g.colRect(startX , startY, xwidth * cooldownscalar, dh, 0, 255, 255, -1);
} else {
g.colRect(startX + 1, startY + 1, (xwidth - 2) * cooldownscalar, dh - 2, 0, 255, 255, -1);
}
}
} else if (canPlay && !sb.summonerSummoned[i][j]) {
Res.getCost(pri / 100, !b, setSym(g, hr, x + iw, y + ih, 3));
if (sb.elu.tick[i][j] == 1) {
Expand Down Expand Up @@ -597,13 +612,28 @@ private void drawLineup(FakeGraphics g, int w, int h, float hr, float term, bool
int dw = (int) (hr * 10);
int dh = (int) (hr * 12);

float cd = 1f * cool / sb.elu.maxC[index][i];
float cooldownscalar = 1f * cool / sb.elu.maxC[index][i];
cooldownscalar = 1f - cooldownscalar;

int xw = (int) (cd * (iw - dw * 2));
int xw2 = (int) (iw - dw * 2);
int xwidth = (int) (iw - dw * 2);
int startX = x + iw - dw - xwidth;
int startY = y + ih - dh * 2;

g.colRect(x + iw - dw - xw2, y + ih - dh * 2, xw2, dh, 0, 0, 0, -1);
g.colRect((x + dw + 2f), (y + ih - dh * 2) + 2f, (iw - dw * 2 - xw) - 4, dh - 4, 0, 255, 255, -1);
boolean full = (h >= 500); // not sure how to get the BattleInfoPage from this, so this is a 'temporary' workaround that breaks on small window sizes

boolean windowTooSmall = (h < 200); // see if the window is really small to not break the drawing
// really small windows break lots of BCU drawing anyways, but it's worth it to check

g.colRect(startX, startY, xwidth, dh, 0, 0, 0, -1); // background draw black square
if (full) {
g.colRect(startX + 2, startY + 2, (xwidth - 4) * cooldownscalar, dh - 4, 0, 255, 255, -1);
} else {
if (windowTooSmall) {
g.colRect(startX , startY, xwidth * cooldownscalar, dh, 0, 255, 255, -1);
} else {
g.colRect(startX + 1, startY + 1, (xwidth - 2) * cooldownscalar, dh - 2, 0, 255, 255, -1);
}
}
} else if (pri != -1 && !sb.summonerSummoned[index][i]) {
Res.getCost(pri / 100, !b, setSym(g, hr, x + iw, y + ih, 3));
}
Expand Down