mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-24 22:14:44 +00:00
Auto-format spaces to tabs (#2)
This commit is contained in:
1 parent
25be7fd254
commit
5bb4b5d9a5
756 files changed
+49198
-48489
No files matched your search
@@ -15,42 +15,42 @@ import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
|
||||
public class ControlChromoPicker extends Control implements ITooltip {
|
||||
Texture Selected;
|
||||
Texture Texture;
|
||||
IChromosomeType type;
|
||||
ControlChromosome parent;
|
||||
Texture Selected;
|
||||
Texture Texture;
|
||||
IChromosomeType type;
|
||||
ControlChromosome parent;
|
||||
|
||||
public ControlChromoPicker(final ControlChromosome parent, final float x, final float y, final IChromosomeType chromo) {
|
||||
super(parent, x, y, 16.0f, 16.0f);
|
||||
this.Selected = new StandardTexture(160, 18, 16, 16, ExtraBeeTexture.GUIPunnett);
|
||||
this.Texture = new StandardTexture(160, 34, 16, 16, ExtraBeeTexture.GUIPunnett);
|
||||
this.type = chromo;
|
||||
this.addAttribute(Attribute.MouseOver);
|
||||
this.parent = parent;
|
||||
this.addSelfEventHandler(new EventWidget.StartMouseOver.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventWidget.StartMouseOver event) {
|
||||
ControlChromoPicker.this.callEvent(new EventValueChanged<Object>(ControlChromoPicker.this.getWidget(), ControlChromoPicker.this.type));
|
||||
}
|
||||
});
|
||||
this.addSelfEventHandler(new EventWidget.EndMouseOver.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventWidget.EndMouseOver event) {
|
||||
ControlChromoPicker.this.callEvent(new EventValueChanged<>(ControlChromoPicker.this.getWidget(), null));
|
||||
}
|
||||
});
|
||||
}
|
||||
public ControlChromoPicker(final ControlChromosome parent, final float x, final float y, final IChromosomeType chromo) {
|
||||
super(parent, x, y, 16.0f, 16.0f);
|
||||
this.Selected = new StandardTexture(160, 18, 16, 16, ExtraBeeTexture.GUIPunnett);
|
||||
this.Texture = new StandardTexture(160, 34, 16, 16, ExtraBeeTexture.GUIPunnett);
|
||||
this.type = chromo;
|
||||
this.addAttribute(Attribute.MouseOver);
|
||||
this.parent = parent;
|
||||
this.addSelfEventHandler(new EventWidget.StartMouseOver.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventWidget.StartMouseOver event) {
|
||||
ControlChromoPicker.this.callEvent(new EventValueChanged<Object>(ControlChromoPicker.this.getWidget(), ControlChromoPicker.this.type));
|
||||
}
|
||||
});
|
||||
this.addSelfEventHandler(new EventWidget.EndMouseOver.Handler() {
|
||||
@Override
|
||||
public void onEvent(final EventWidget.EndMouseOver event) {
|
||||
ControlChromoPicker.this.callEvent(new EventValueChanged<>(ControlChromoPicker.this.getWidget(), null));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
final boolean selected = this.isMouseOver();
|
||||
final Texture text = selected ? this.Selected : this.Texture;
|
||||
CraftGUI.Render.texture(text, IPoint.ZERO);
|
||||
}
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
final boolean selected = this.isMouseOver();
|
||||
final Texture text = selected ? this.Selected : this.Texture;
|
||||
CraftGUI.Render.texture(text, IPoint.ZERO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
tooltip.add(Binnie.Genetics.getSystem(this.parent.getRoot()).getChromosomeName(this.type));
|
||||
}
|
||||
@Override
|
||||
public void getTooltip(final Tooltip tooltip) {
|
||||
tooltip.add(Binnie.Genetics.getSystem(this.parent.getRoot()).getChromosomeName(this.type));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user