Rename Widget some Methods

This commit is contained in:
Nedelosk committed 2017-08-01 00:43:43 +02:00
1 parent 3e3c9c30a4
commit b0503fe523
33 files changed
+124 -131

No files matched your search

@@ -23,7 +23,7 @@ public class ControlSplicerProgress extends ControlProgressBase {
final float progress = this.getProcess().getCurrentProgress() / 100.0f;
final float n = this.getProcess().getProcessTime() / 12.0f;
final int spacing = 10;
final float range = this.width();
final float range = this.getWidth();
final int h = 8;
final float ooy = -((n - 1.0f) * spacing) - range / 2.0f;
final float ddy = (n - 1.0f) * spacing + range;
@@ -38,17 +38,17 @@ public class ControlSplicerProgress extends ControlProgressBase {
final int y = oy + i * spacing;
if (y > -range / 2.0f && y < range / 2.0f) {
final float percentView = (float) Math.sqrt(1.0f - Math.abs(2.0f * y / range));
final float offMovement = (this.height() - 2.0f * h) / 2.0f;
final float offMovement = (this.getHeight() - 2.0f * h) / 2.0f;
final int alpha = 16777216 * (int) (255.0f * percentView);
c1 += alpha;
c2 += alpha;
c3 += alpha;
c4 += alpha;
int viewAmount = Math.round(offMovement * percentView);
RenderUtil.drawSolidRectWithAlpha(new Area(this.width() / 2 + y, viewAmount, 4, h / 2), c1);
RenderUtil.drawSolidRectWithAlpha(new Area(this.width() / 2 + y, viewAmount + 4, 4, h / 2), (y < 0) ? c2 : c3);
RenderUtil.drawSolidRectWithAlpha(new Area(this.width() / 2 + y, this.height() - viewAmount - 8, 4, h / 2), (y < 0) ? c3 : c2);
RenderUtil.drawSolidRectWithAlpha(new Area(this.width() / 2 + y, this.height() - viewAmount - 4, 4, h / 2), c4);
RenderUtil.drawSolidRectWithAlpha(new Area(this.getWidth() / 2 + y, viewAmount, 4, h / 2), c1);
RenderUtil.drawSolidRectWithAlpha(new Area(this.getWidth() / 2 + y, viewAmount + 4, 4, h / 2), (y < 0) ? c2 : c3);
RenderUtil.drawSolidRectWithAlpha(new Area(this.getWidth() / 2 + y, this.getHeight() - viewAmount - 8, 4, h / 2), (y < 0) ? c3 : c2);
RenderUtil.drawSolidRectWithAlpha(new Area(this.getWidth() / 2 + y, this.getHeight() - viewAmount - 4, 4, h / 2), c4);
}
}
}