Files

59 lines
1.4 KiB
Markdown

# UILabelComponent — giriş
[← UILabelComponent](index.md) · [← Master](../../wiki.md)
mchorse.mappet.api.ui.components
Class UILabelComponent
java.lang.Object
mchorse.mappet.api.ui.components.UIComponent
mchorse.mappet.api.ui.components.UILabelBaseComponent
mchorse.mappet.api.ui.components.UILabelComponent
public class UILabelComponent
extends UILabelBaseComponent
Label UI component.
This component allows you to input one line of text. You can use Minecraft's formatting using "[" symbol instead of
section field.
This component can be created using IMappetUIBuilder.label(String) method.
function main(c)
{
var ui = mappet.createUI().background();
var label = ui.label("Welcome, [l" + c.getSubject().getName() + "[r!");
label.rxy(0.5, 0.5).wh(100, 20).anchor(0.5);
label.color(0x00ee22).background(0x88000000).labelAnchor(0.5);
c.getSubject().openUI(ui);
}
Field Summary
Fields
Modifier and Type Field and Description
float anchorX
float anchorY
java.lang.Integer background
Fields inherited from
class mchorse.mappet.api.ui.components.UILabelBaseComponent
hasBackground, label
Fields inherited from class mchorse.mappet.api.ui.components.UIComponent
changedProperties, context, DELAY, enabled, h, id, keybinds, marginBottom, marginLeft, marginRight, marginTop,
tooltip, tooltipDirection, updateDelay, visible, w, x, y
Constructor Summary
Constructors
Constructor and Description