mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +00:00
start 1.10.2
This commit is contained in:
1 parent
f969f63b66
commit
6a7c4bf67d
826 files changed
+60550
-63758
No files matched your search
@@ -1,61 +1,51 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.craftgui.botany;
|
||||
|
||||
import binnie.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITextureSheet;
|
||||
import binnie.craftgui.core.Tooltip;
|
||||
import binnie.craftgui.core.Attribute;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.geometry.IPoint;
|
||||
import binnie.craftgui.core.CraftGUI;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import binnie.craftgui.core.ITooltip;
|
||||
import binnie.craftgui.controls.core.Control;
|
||||
import binnie.craftgui.core.*;
|
||||
import binnie.craftgui.core.geometry.IPoint;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITextureSheet;
|
||||
import binnie.craftgui.resource.minecraft.StandardTexture;
|
||||
|
||||
public class ControlColourMixSymbol extends Control implements ITooltip
|
||||
{
|
||||
static Texture MutationPlus;
|
||||
static Texture MutationArrow;
|
||||
IColourMix value;
|
||||
int type;
|
||||
public class ControlColourMixSymbol extends Control implements ITooltip {
|
||||
static Texture MutationPlus;
|
||||
static Texture MutationArrow;
|
||||
IColourMix value;
|
||||
int type;
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
if (this.type == 0) {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationPlus, IPoint.ZERO);
|
||||
}
|
||||
else {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationArrow, IPoint.ZERO);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
if (this.type == 0) {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationPlus, IPoint.ZERO);
|
||||
} else {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationArrow, IPoint.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
protected ControlColourMixSymbol(final IWidget parent, final int x, final int y, final int type) {
|
||||
super(parent, x, y, 16 + type * 16, 16.0f);
|
||||
this.value = null;
|
||||
this.type = type;
|
||||
this.addAttribute(Attribute.MouseOver);
|
||||
}
|
||||
protected ControlColourMixSymbol(final IWidget parent, final int x, final int y, final int type) {
|
||||
super(parent, x, y, 16 + type * 16, 16.0f);
|
||||
this.value = null;
|
||||
this.type = type;
|
||||
this.addAttribute(Attribute.MouseOver);
|
||||
}
|
||||
|
||||
public void setValue(final IColourMix value) {
|
||||
this.value = value;
|
||||
this.setColour(16777215);
|
||||
}
|
||||
public void setValue(final IColourMix value) {
|
||||
this.value = value;
|
||||
this.setColour(16777215);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
if (this.type == 1) {
|
||||
final float chance = this.value.getChance();
|
||||
tooltip.add("Current Chance - " + chance + "%");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
if (this.type == 1) {
|
||||
final float chance = this.value.getChance();
|
||||
tooltip.add("Current Chance - " + chance + "%");
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
ControlColourMixSymbol.MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
|
||||
ControlColourMixSymbol.MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
|
||||
}
|
||||
static {
|
||||
ControlColourMixSymbol.MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
|
||||
ControlColourMixSymbol.MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user