public abstract class Widget extends AbstractGui implements IRenderable, IGuiEventListener
Modifier and Type | Field and Description |
---|---|
boolean |
active |
protected float |
alpha |
private boolean |
focused |
protected int |
height |
protected boolean |
isHovered |
private java.lang.String |
message |
private static int |
NARRATE_DELAY_FOCUS |
private static int |
NARRATE_DELAY_MOUSE |
protected long |
nextNarration |
protected int |
packedFGColor |
static int |
UNSET_FG_COLOR |
boolean |
visible |
private boolean |
wasHovered |
static ResourceLocation |
WIDGETS_LOCATION |
protected int |
width |
int |
x |
int |
y |
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Constructor and Description |
---|
Widget(int xIn,
int yIn,
int widthIn,
int heightIn,
java.lang.String msg) |
Widget(int xIn,
int yIn,
java.lang.String msg) |
Modifier and Type | Method and Description |
---|---|
boolean |
changeFocus(boolean p_changeFocus_1_) |
void |
clearFGColor() |
protected boolean |
clicked(double p_clicked_1_,
double p_clicked_3_) |
int |
getFGColor() |
int |
getHeight() |
java.lang.String |
getMessage() |
protected java.lang.String |
getNarrationMessage() |
int |
getWidth() |
protected int |
getYImage(boolean p_getYImage_1_) |
boolean |
isFocused() |
boolean |
isHovered() |
boolean |
isMouseOver(double p_isMouseOver_1_,
double p_isMouseOver_3_) |
protected boolean |
isValidClickButton(int p_isValidClickButton_1_) |
boolean |
mouseClicked(double p_mouseClicked_1_,
double p_mouseClicked_3_,
int p_mouseClicked_5_) |
boolean |
mouseDragged(double p_mouseDragged_1_,
double p_mouseDragged_3_,
int p_mouseDragged_5_,
double p_mouseDragged_6_,
double p_mouseDragged_8_) |
boolean |
mouseReleased(double p_mouseReleased_1_,
double p_mouseReleased_3_,
int p_mouseReleased_5_) |
protected void |
narrate() |
void |
onClick(double p_onClick_1_,
double p_onClick_3_) |
protected void |
onDrag(double p_onDrag_1_,
double p_onDrag_3_,
double p_onDrag_5_,
double p_onDrag_7_) |
protected void |
onFocusedChanged(boolean p_onFocusedChanged_1_) |
void |
onRelease(double p_onRelease_1_,
double p_onRelease_3_) |
void |
playDownSound(SoundHandler p_playDownSound_1_) |
void |
queueNarration(int p_queueNarration_1_) |
void |
render(int p_render_1_,
int p_render_2_,
float p_render_3_) |
protected void |
renderBg(Minecraft p_renderBg_1_,
int p_renderBg_2_,
int p_renderBg_3_) |
void |
renderButton(int p_renderButton_1_,
int p_renderButton_2_,
float p_renderButton_3_) |
void |
renderToolTip(int p_renderToolTip_1_,
int p_renderToolTip_2_) |
void |
setAlpha(float p_setAlpha_1_) |
void |
setFGColor(int color) |
protected void |
setFocused(boolean p_setFocused_1_) |
void |
setHeight(int value) |
void |
setMessage(java.lang.String p_setMessage_1_) |
void |
setWidth(int p_setWidth_1_) |
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fill, fillGradient, getBlitOffset, hLine, innerBlit, setBlitOffset, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
public static final ResourceLocation WIDGETS_LOCATION
private static final int NARRATE_DELAY_MOUSE
private static final int NARRATE_DELAY_FOCUS
protected int width
protected int height
public int x
public int y
private java.lang.String message
private boolean wasHovered
protected boolean isHovered
public boolean active
public boolean visible
protected float alpha
protected long nextNarration
private boolean focused
public static final int UNSET_FG_COLOR
protected int packedFGColor
public Widget(int xIn, int yIn, java.lang.String msg)
public Widget(int xIn, int yIn, int widthIn, int heightIn, java.lang.String msg)
protected int getYImage(boolean p_getYImage_1_)
public void render(int p_render_1_, int p_render_2_, float p_render_3_)
render
in interface IRenderable
protected void narrate()
protected java.lang.String getNarrationMessage()
public void renderButton(int p_renderButton_1_, int p_renderButton_2_, float p_renderButton_3_)
protected void renderBg(Minecraft p_renderBg_1_, int p_renderBg_2_, int p_renderBg_3_)
public void onClick(double p_onClick_1_, double p_onClick_3_)
public void onRelease(double p_onRelease_1_, double p_onRelease_3_)
protected void onDrag(double p_onDrag_1_, double p_onDrag_3_, double p_onDrag_5_, double p_onDrag_7_)
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
mouseClicked
in interface IGuiEventListener
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_)
mouseReleased
in interface IGuiEventListener
protected boolean isValidClickButton(int p_isValidClickButton_1_)
public boolean mouseDragged(double p_mouseDragged_1_, double p_mouseDragged_3_, int p_mouseDragged_5_, double p_mouseDragged_6_, double p_mouseDragged_8_)
mouseDragged
in interface IGuiEventListener
protected boolean clicked(double p_clicked_1_, double p_clicked_3_)
public boolean isHovered()
public boolean changeFocus(boolean p_changeFocus_1_)
changeFocus
in interface IGuiEventListener
protected void onFocusedChanged(boolean p_onFocusedChanged_1_)
public boolean isMouseOver(double p_isMouseOver_1_, double p_isMouseOver_3_)
isMouseOver
in interface IGuiEventListener
public void renderToolTip(int p_renderToolTip_1_, int p_renderToolTip_2_)
public void playDownSound(SoundHandler p_playDownSound_1_)
public int getWidth()
public void setWidth(int p_setWidth_1_)
public int getHeight()
public void setHeight(int value)
public void setAlpha(float p_setAlpha_1_)
public void setMessage(java.lang.String p_setMessage_1_)
public void queueNarration(int p_queueNarration_1_)
public java.lang.String getMessage()
public boolean isFocused()
protected void setFocused(boolean p_setFocused_1_)
public int getFGColor()
public void setFGColor(int color)
public void clearFGColor()