Files

59 lines
1.8 KiB
Markdown

# UIIconButtonComponent.UIIconButtonComponent
[← UIIconButtonComponent](index.md) · [← Master](../../wiki.md)
Parça 1/2 · [sonraki](UIIconButtonComponent-2.md)
UIIconButtonComponent()
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description
protected void applyProperty(UIContext context, java.lang.String key, GuiElement element)
GuiElement create(Minecraft mc, UIContext context)
void deserializeNBT(NBTTagCompound tag)
UIIconButtonComponent icon(java.lang.String icon)
Change icon component's icon.
protected boolean isDataReserved()
void populateData(NBTTagCompound tag)
void serializeNBT(NBTTagCompound tag)
Methods inherited from class mchorse.mappet.api.ui.components.UIComponent
anchor, anchor, anchorX, anchorY, apply, applyKeybinds, change, clearChanges, context, context, createContext,
enabled, getChanges, getChildComponents, getDefaultUpdateDelay, h, handleChanges, id, keybind, keybind,
keybind, keybind, margin, marginBottom, marginLeft, marginRight, marginTop, resetContext, rh, rh, rw, rw, rwh,
rx, rx, rxy, ry, ry, serializeNBT, tooltip, tooltip, updateDelay, visible, w, wh, x, xy, y
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
icon
public java.lang.String icon
Constructor Detail
UIIconButtonComponent
public UIIconButtonComponent()
Method Detail
icon
public UIIconButtonComponent icon(java.lang.String icon)
Change icon component's icon.
You can find out all available icons by entering following line into Mappet's REPL (it returns a Java Set):
Java.type("mchorse.mclib.client.gui.utils.IconRegistry").icons.keySet()
So using that piece of code, you can get create a GUI that shows every icon with a tooltip:
function main(c)