Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftKeyboard Component #22

Open
VladimirCores opened this issue May 4, 2014 · 6 comments
Open

SoftKeyboard Component #22

VladimirCores opened this issue May 4, 2014 · 6 comments

Comments

@VladimirCores
Copy link

I want to use Softkeyboard for my game, based on http://cote.cc/projects/softkeyboard. So i want to realize it with your framework entities. Could you help me to do so?

@rzarich
Copy link
Collaborator

rzarich commented May 5, 2014

Try to use our component com.in4ray.gaming.components.NativeText which invokes SoftKeyboard.

@VladimirCores
Copy link
Author

Thank you. It's works! But do you know how can i manually trigger event to display native keyboard on ipad?

@VladimirCores
Copy link
Author

this is my code at Class constructor:
tfNative = new NativeText(1);
tfNative.text = "HELLO WORLD";
tfNative.backgroundColor = 0xf1f1f1;
tfNative.fillBackground = false;
tfNative.editable = true;
tfNative.textAlign = TextFormatAlign.CENTER;

Than:
private function addedToStageHandler(event:Event):void
{
tfNative.assignFocus();
}

But it's not work, keyboard does not shown.

Instead of that i try to use only StageText like so:
tfStage = new StageText(new StageTextInitOptions(false));
tfStage.editable = true;
tfStage.stage = Main.STAGE;

private function addedToStageHandler(event:Event):void
{
tfStage.assignFocus();
}

And it's work fine, but it move everything up.

@rzarich
Copy link
Collaborator

rzarich commented May 6, 2014

  1. You haven't capablity to invoke native keyboard manually. Focus should be on the text component and AIR manually invokes keyboard.
  2. See param in the descriptor file softKeyboardBehavior which is responsible for moving stage.

@VladimirCores
Copy link
Author

Thank you!

@VladimirCores
Copy link
Author

I have a trouble with listening on the change event from StageText, it does not happen. Maybe you know any solutions for that?

@VladimirCores VladimirCores reopened this May 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants