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

Add controller buttons combo #116

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Add controller buttons combo #116

merged 3 commits into from
Jun 18, 2024

Conversation

k3kukua
Copy link
Contributor

@k3kukua k3kukua commented May 11, 2024

Combos - an easy way to keep track of controller button combinations.
Demo: "Додатки" -> "Тести" -> "Combo" (apps/demos/combo)

Classes:

  • ComboOneButton - tracking a single button press
  • ComboOneHoldDownButton - tracking the hold of a single button
  • ComboButtonSequence - tracking sequential button presses
  • ComboConcurrentButtons - tracking simultaneous button presses

Example:
Init:
ComboButtonSequence combo({Button::DOWN, Button::UP, Button::UP, Button::DOWN, Button::A, Button::B, Button::B, Button::A});
Optional use handler:
combo.setCompletedEventHandler(handler);
Using:
combo.loop(lilka::controller.getState());
Check combo status:
combo.isCompleted()

@and3rson
Copy link
Owner

and3rson commented Jun 5, 2024

@k3kukua Дякую за PR! Це гарний функціонал!
Чи можеш переглянути помилки? Там є деякі проблеми в коді, які потрібно виправити (див. результати clang-format і cppcheck)

@k3kukua
Copy link
Contributor Author

k3kukua commented Jun 7, 2024

@k3kukua Дякую за PR! Це гарний функціонал! Чи можеш переглянути помилки? Там є деякі проблеми в коді, які потрібно виправити (див. результати clang-format і cppcheck)

Виправлено

@black-ghost-off
Copy link
Collaborator

@k3kukua , check cppcheck again please

@and3rson
Copy link
Owner

@k3kukua Дякую!

@and3rson and3rson merged commit 9a5ac4d into and3rson:main Jun 18, 2024
3 checks passed
@and3rson and3rson added enhancement New feature or request scope:keira labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope:keira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants