mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-19 11:49:06 +00:00
34 lines
914 B
Java
34 lines
914 B
Java
package me.towdium.jecalculation.gui.widgets;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import me.towdium.jecalculation.gui.JecaGui;
|
|
import me.towdium.jecalculation.polyfill.MethodsReturnNonnullByDefault;
|
|
|
|
import javax.annotation.ParametersAreNonnullByDefault;
|
|
|
|
/**
|
|
* Author: towdium
|
|
* Date: 17-8-22.
|
|
*/
|
|
@ParametersAreNonnullByDefault
|
|
@MethodsReturnNonnullByDefault
|
|
@SideOnly(Side.CLIENT)
|
|
public class WRectangle implements IWidget {
|
|
public int xPos, yPos, xSize, ySize, color;
|
|
|
|
public WRectangle(int xPos, int yPos, int xSize, int ySize, int color) {
|
|
this.xPos = xPos;
|
|
this.yPos = yPos;
|
|
this.xSize = xSize;
|
|
this.ySize = ySize;
|
|
this.color = color;
|
|
}
|
|
|
|
@Override
|
|
public boolean onDraw(JecaGui gui, int xMouse, int yMouse) {
|
|
gui.drawRectangle(xPos, yPos, xSize, ySize, color);
|
|
return false;
|
|
}
|
|
}
|