Search in sources :

Example 16 with UIButton

use of org.terasology.nui.widgets.UIButton in project Terasology by MovingBlocks.

the class InputSettingsScreen method makeInputBindButton.

private UIButton makeInputBindButton(SimpleUri uri, RegisterBindButton bind, List<Input> binds, int index) {
    UIButton inputBind = new UIButton();
    inputBind.bindText(new BindingText(binds, index));
    inputBind.subscribe(event -> {
        ChangeBindingPopup popup = getManager().pushScreen(ChangeBindingPopup.ASSET_URI, ChangeBindingPopup.class);
        popup.setBindingData(uri, bind, index);
    });
    return inputBind;
}
Also used : UIButton(org.terasology.nui.widgets.UIButton)

Aggregations

UIButton (org.terasology.nui.widgets.UIButton)16 UILabel (org.terasology.nui.widgets.UILabel)8 List (java.util.List)3 Collectors (java.util.stream.Collectors)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 ColumnLayout (org.terasology.nui.layouts.ColumnLayout)3 UIBox (org.terasology.nui.widgets.UIBox)3 UIText (org.terasology.nui.widgets.UIText)3 Defaults (com.google.common.base.Defaults)2 Component (java.awt.Component)2 File (java.io.File)2 Constructor (java.lang.reflect.Constructor)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Parameter (java.lang.reflect.Parameter)2 Arrays (java.util.Arrays)2 Optional (java.util.Optional)2 Future (java.util.concurrent.Future)2 JDialog (javax.swing.JDialog)2 JFileChooser (javax.swing.JFileChooser)2