Search in sources :

Example 1 with Input

use of io.xol.chunkstories.api.input.Input in project chunkstories by Hugobros3.

the class Lwjgl3ClientInputsManager method insertInput.

public void insertInput(String type, String name, String value, Collection<String> arguments) {
    Input input;
    if (type.equals("keyBind")) {
        Lwjgl3KeyBind key = new Lwjgl3KeyBind(this, name, value);
        input = key;
        if (arguments.contains("hidden"))
            key.editable = false;
        if (arguments.contains("repeat"))
            key.repeat = true;
    // keyboardInputs.add(key);
    } else if (type.equals("virtual")) {
        input = new InputVirtual(name);
    } else if (type.equals("keyBindCompound")) {
        Lwjgl3KeyBindCompound keyCompound = new Lwjgl3KeyBindCompound(this, name, value);
        input = keyCompound;
    } else
        return;
    inputs.add(input);
    inputsMap.put(input.getHash(), input);
}
Also used : PacketInput(io.xol.chunkstories.net.packets.PacketInput) Input(io.xol.chunkstories.api.input.Input) InputVirtual(io.xol.chunkstories.input.InputVirtual)

Example 2 with Input

use of io.xol.chunkstories.api.input.Input in project chunkstories by Hugobros3.

the class ServerInputsManager method insertInput.

public void insertInput(String type, String name, String value, Collection<String> arguments) {
    Input input;
    // 2deep4me
    if (type.equals("keyBind") || type.equals("virtual")) {
        input = new InputVirtual(name);
    } else
        return;
    inputs.add(input);
    inputsMap.put(input.getHash(), input);
}
Also used : Input(io.xol.chunkstories.api.input.Input) InputVirtual(io.xol.chunkstories.input.InputVirtual)

Aggregations

Input (io.xol.chunkstories.api.input.Input)2 InputVirtual (io.xol.chunkstories.input.InputVirtual)2 PacketInput (io.xol.chunkstories.net.packets.PacketInput)1