Improve/refactoring (#15)

* Improve the code

* Code improve in binnie.core.utils package

* Code improve in binnie.core.triggers package

* Code improve in binnie.core.resource package

* Code improve in binnie.core.proxy package

* Code improve readability in binnie.core package

* Add missed constructors

* Some improve code readabilty

* Expand import with *

* Revert "Expand import with *"

This reverts commit 3bb4a44f3b69a8559bd5753337e0f6793ad18dc4.

* Fix using fully qualified names in imports

* Fix missed unnessesary "this."

* Removed binnie.craftgui package
Optimised imports and removed unnessesary "this."

* Some refactoring code in binnie.core.craftgui package

* Merge from master1.7.10

* Improve code readability in binnie.core.craftgui.database package

* Improve code readability in binnie.core.craftgui.events package

* Improve code readability in binnie.core.craftgui.geometry package

* Improve code readability in binnie.core.craftgui.* package
This commit is contained in:
Alexander Kornilov authored and mezz committed 2017-04-26 15:09:09 -07:00
1 parent a3c2360ba6
commit f402cb155f
428 files changed
+9515 -10103

No files matched your search

@@ -0,0 +1,55 @@
//
// Decompiled by Procyon v0.5.30
//
package binnie.genetics.craftgui;
import binnie.core.craftgui.geometry.IArea;
import binnie.core.craftgui.CraftGUI;
import binnie.core.craftgui.IWidget;
import binnie.core.craftgui.minecraft.control.ControlProgressBase;
public class ControlSplicerProgress extends ControlProgressBase
{
float strength;
public ControlSplicerProgress(final IWidget parent, final float x, final float y, final float w, final float h) {
super(parent, x, y, w, h);
this.strength = 0.0f;
this.strength = 0.0f;
}
@Override
public void onRenderBackground() {
final float progress = this.getProcess().getCurrentProgress() / 100.0f;
final float n = this.getProcess().getProcessTime() / 12.0f;
final float spacing = 10.0f;
final float range = this.w();
final float h = 8.0f;
final float ooy = -((n - 1.0f) * spacing) - range / 2.0f;
final float ddy = (n - 1.0f) * spacing + range;
final float oy = ooy + ddy * progress;
for (int i = 0; i < n; ++i) {
final int seed = 432523;
final int[] colours = { 10027008, 30464, 255, 10057472 };
int c1 = colours[(int) Math.abs(13.0 * Math.sin(i) + 48.0 * Math.cos(i) + 25.0 * Math.sin(7 * i)) % 4];
int c2 = colours[(int) Math.abs(23.0 * Math.sin(i) + 28.0 * Math.cos(i) + 15.0 * Math.sin(7 * i)) % 4];
int c3 = colours[(int) Math.abs(43.0 * Math.sin(i) + 38.0 * Math.cos(i) + 55.0 * Math.sin(7 * i)) % 4];
int c4 = colours[(int) Math.abs(3.0 * Math.sin(i) + 18.0 * Math.cos(i) + 35.0 * Math.sin(7 * i)) % 4];
final float 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.h() - 2.0f * h) / 2.0f;
final int alpha = 16777216 * (int) (255.0f * percentView);
c1 += alpha;
c2 += alpha;
c3 += alpha;
c4 += alpha;
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, offMovement * percentView, 4.0f, h / 2.0f), c1);
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, offMovement * percentView + 4.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c2 : c3);
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, this.h() - offMovement * percentView - 8.0f, 4.0f, h / 2.0f), (y < 0.0f) ? c3 : c2);
CraftGUI.Render.solidAlpha(new IArea(this.w() / 2.0f + y, this.h() - offMovement * percentView - 4.0f, 4.0f, h / 2.0f), c4);
}
}
}
}