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

Support scene accelerators #85

Open
cebaa opened this issue Mar 12, 2019 · 4 comments
Open

Support scene accelerators #85

cebaa opened this issue Mar 12, 2019 · 4 comments

Comments

@cebaa
Copy link

cebaa commented Mar 12, 2019

A shortcut for this:

Observable.generate(emitter -> {
         scene.getAccelerators().put(new KeyCharacterCombination("c"),
            () -> emitter.onNext(true));
      });
@thomasnield
Copy link
Collaborator

Can you put in a PR, thanks!

@rcd27
Copy link

rcd27 commented Mar 14, 2019

What kind of shortcut do you want to see as result?
val keyCharObservable = eventsOf(scene, EventType<KeyCharacterCombination, "c">)?

@cebaa
Copy link
Author

cebaa commented Mar 14, 2019

@rcd27

Since the signature is:

public ObservableMap<KeyCombination,Runnable> getAccelerators()

so maybe something like this:

val keyCharObservable = withAccelerator(scene, new KeyCharacterCombination("c"))

@rcd27
Copy link

rcd27 commented Mar 14, 2019

@thomasnield I think I'm able to do that

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

3 participants