Search in sources :

Example 1 with GuiValidityStateIndicator

use of ivorius.reccomplex.gui.GuiValidityStateIndicator in project RecurrentComplex by Ivorforce.

the class TableCellTextField method initGui.

@Override
public void initGui(GuiTable screen) {
    super.initGui(screen);
    Bounds bounds = bounds();
    if (textField == null)
        textField = new GuiTextField(0, getFontRenderer(), 0, 0, 0, 0);
    updateTextFieldBounds(bounds);
    textField.setMaxStringLength(maxStringLength);
    textField.setText(serialize(getPropertyValue()));
    textField.setVisible(!isHidden());
    textField.setEnabled(enabled);
    if (showsValidityState()) {
        stateIndicator = new GuiValidityStateIndicator(bounds.getMaxX() - 12, bounds.getCenterY() - 5, GuiValidityStateIndicator.State.UNKNWON);
        updateValidityStateIndicator();
        stateIndicator.setVisible(!isHidden());
    } else {
        stateIndicator = null;
    }
}
Also used : Bounds(ivorius.reccomplex.gui.table.Bounds) GuiTextField(net.minecraft.client.gui.GuiTextField) GuiValidityStateIndicator(ivorius.reccomplex.gui.GuiValidityStateIndicator)

Aggregations

GuiValidityStateIndicator (ivorius.reccomplex.gui.GuiValidityStateIndicator)1 Bounds (ivorius.reccomplex.gui.table.Bounds)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1