Package org.terasology.rendering.nui.widgets

Examples of org.terasology.rendering.nui.widgets.UICheckbox


            logger.warn("Contents of {} missing button with id '{}'", widget, id);
        }
    }

    public static void tryBindCheckbox(UIWidget widget, String id, Binding<Boolean> binding) {
        UICheckbox checkbox = widget.find(id, UICheckbox.class);
        if (checkbox != null) {
            checkbox.bindChecked(binding);
        }
    }
View Full Code Here


    }

    private class CheckboxPropertyFactory implements PropertyFactory<Checkbox> {
        @Override
        public Property create(FieldMetadata<Object, ?> fieldMetadata, String id, Checkbox info) {
            UICheckbox checkbox = new UICheckbox();
            Binding<Boolean> binding = new BooleanTextBinding((FieldMetadata<Object, Boolean>) fieldMetadata);
            checkbox.bindChecked(binding);
            String label = fromLabelOrId(info.label(), id);
            return new Property<>(label, binding, checkbox, info.description());
        }
View Full Code Here

        mouseSensitivity.setIncrement(0.025f);
        mouseSensitivity.setPrecision(3);

        mainLayout.addWidget(new UILabel("mouseLabel", "heading-input", "Mouse"));
        mainLayout.addWidget(new RowLayout(new UILabel("Mouse Sensitivity:"), mouseSensitivity).setColumnRatios(0.4f).setHorizontalSpacing(horizontalSpacing));
        mainLayout.addWidget(new RowLayout(new UILabel("Invert Mouse:"), new UICheckbox("mouseYAxisInverted")).setColumnRatios(0.4f).setHorizontalSpacing(horizontalSpacing));

        Map<String, InputCategory> inputCategories = Maps.newHashMap();
        Map<SimpleUri, RegisterBindButton> inputsById = Maps.newHashMap();
        DependencyResolver resolver = new DependencyResolver(moduleManager.getRegistry());
        for (Name moduleId : moduleManager.getRegistry().getModuleIds()) {
View Full Code Here

TOP

Related Classes of org.terasology.rendering.nui.widgets.UICheckbox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.