Skip to content

Support scene accelerators #85

Open

Description

@cebaa

A shortcut for this:

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

Activity

  1. thomasnield commented on Mar 13, 2019

    @thomasnield
    Collaborator

    Can you put in a PR, thanks!

  2. rcd27 commented on Mar 14, 2019

    @rcd27

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

  3. cebaa commented on Mar 14, 2019

    @cebaa
    Author

    @rcd27

    Since the signature is:

    public ObservableMap<KeyCombination,Runnable> getAccelerators()
    

    so maybe something like this:

    val keyCharObservable = withAccelerator(scene, new KeyCharacterCombination("c"))
    
  4. rcd27 commented on Mar 14, 2019

    @rcd27

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions