Merge branch 'master' of bitbucket.org:shmyga/haxework
This commit is contained in:
@@ -20,7 +20,7 @@ class InputView extends TextView {
|
||||
super();
|
||||
textField.type = TextFieldType.INPUT;
|
||||
textField.addEventListener(Event.CHANGE, onTextChange);
|
||||
textField.addEventListener(KeyboardEvent.KEY_UP, _onKeyUp);
|
||||
textField.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
|
||||
textField.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
|
||||
|
||||
hintTextField = buildHintTextField();
|
||||
@@ -50,7 +50,7 @@ class InputView extends TextView {
|
||||
hintTextField.visible = (textField.text == "");
|
||||
}
|
||||
|
||||
private function _onKeyUp(event:KeyboardEvent):Void {
|
||||
private function onKeyUp(event:KeyboardEvent):Void {
|
||||
event.stopImmediatePropagation();
|
||||
_text = textField.text;
|
||||
onChange.emit(_text);
|
||||
@@ -72,7 +72,7 @@ class InputView extends TextView {
|
||||
|
||||
public function dispose():Void {
|
||||
textField.removeEventListener(Event.CHANGE, onTextChange);
|
||||
textField.removeEventListener(KeyboardEvent.KEY_UP, _onKeyUp);
|
||||
textField.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
|
||||
textField.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ class ScrollView extends HGroupView {
|
||||
|
||||
private function set_position(value:Float):Float {
|
||||
position = Math.min(Math.max(0, value), 1 - (height / view.height));
|
||||
if (height / view.height > 1) position = 0;
|
||||
if (scroll != null) {
|
||||
scroll.position = position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user