Java Code Examples for com.badlogic.gdx.scenes.scene2d.utils.UIUtils#shift()
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.utils.UIUtils#shift() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractListAdapter.java From vis-ui with Apache License 2.0 | 4 votes |
private boolean isGroupMultiSelectKeyPressed () { if (groupMultiSelectKey == DEFAULT_KEY) return UIUtils.shift(); else return Gdx.input.isKeyPressed(groupMultiSelectKey); }
Example 2
Source File: VisTextArea.java From vis-ui with Apache License 2.0 | 4 votes |
@Override public boolean keyDown (InputEvent event, int keycode) { boolean result = super.keyDown(event, keycode); Stage stage = getStage(); if (stage != null && stage.getKeyboardFocus() == VisTextArea.this) { boolean repeat = false; boolean shift = UIUtils.shift(); if (keycode == Input.Keys.DOWN) { if (shift) { if (!hasSelection) { selectionStart = cursor; hasSelection = true; } } else { clearSelection(); } moveCursorLine(cursorLine + 1); repeat = true; } else if (keycode == Input.Keys.UP) { if (shift) { if (!hasSelection) { selectionStart = cursor; hasSelection = true; } } else { clearSelection(); } moveCursorLine(cursorLine - 1); repeat = true; } else { moveOffset = -1; } if (repeat) { scheduleKeyRepeatTask(keycode); } showCursor(); return true; } return result; }