Beispiel #1
0
def setActive(value):
    global isActive
    isActive = value

    keyboardEvent = Keyboard("action")
    keyboardEvent.on(actionKeyboard)

    if isActive:
        Update.on(checkForAction)
def setActive(value):
	global isActive;
	isActive = value;

	keyboardEvent = Keyboard("action");
	keyboardEvent.on(actionKeyboard);

	if isActive:
		Update.on(checkForAction);
def setActive():
    leftKey = Keyboard("left")
    leftKey.on(moveLeft)
    rightKey = Keyboard("right")
    rightKey.on(moveRight)

    setControlsEnabled(True)

    Update.on(lambda: updatePosition())
Beispiel #4
0
def setActive(value):
    global isActive
    isActive = value

    if value:
        keyboardEvent = Keyboard("action")
        keyboardEvent.on(keyboardInput)

        cancelEvent = Keyboard("escape")
        cancelEvent.on(cancelInput)
def setActive():
	leftKey = Keyboard("left");
	leftKey.on(moveLeft);
	rightKey = Keyboard("right");
	rightKey.on(moveRight);

	setControlsEnabled(True);

	Update.on(lambda: updatePosition());
def setActive(value):
	global isActive;
	isActive = value;

	if value:
		keyboardEvent = Keyboard("action");
		keyboardEvent.on(keyboardInput);

		cancelEvent = Keyboard("escape");
		cancelEvent.on(cancelInput);
Beispiel #7
0
def setActive(value):
	global isActive;
	global isOpen;
	global usedInterface;

	isActive = value;

	usedInterface = GlobalVars.getVar("menuInterface");
	usedInterface.setOutside(outsider);

	if value:
		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp2);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown2);
		arrowLeft = Keyboard("left");
		arrowLeft.on(closeGameMenu);
Beispiel #8
0
def setActive(value):
    global isActive
    global usedInterface
    isActive = value

    if value:
        keyboardInput = Keyboard("escape")
        keyboardInput.on(keyboardOpenPause)
        usedInterface = GlobalVars.getVar("pauseInterface")

        selectItem = Keyboard("action")
        selectItem.on(selectionItem)

        arrowUp = Keyboard("up")
        arrowUp.on(moveSelectionUp)
        arrowDown = Keyboard("down")
        arrowDown.on(moveSelectionDown)
def setActive(value):
	global isActive;
	isActive = value;

	keyboardAction = Keyboard("escape");
	keyboardAction.on(doClear);
Beispiel #10
0
def setActive(value):
    global isActive
    isActive = value

    keyboardAction = Keyboard("escape")
    keyboardAction.on(doClear)
def setActive(value):
	global isActive;
	global usedInterface;
	isActive = value;

	if value:
		keyboardInput = Keyboard("escape");
		keyboardInput.on(keyboardOpenPause);
		usedInterface = GlobalVars.getVar("pauseInterface");

		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown);
def setActive(value):
	global isActive;
	isActive = value;

	if value:
		keyboardInput = Keyboard("inventory");
		keyboardInput.on(keyboardOpenInventory);

		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown);