GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://cubosengine.org
MIT License
83 stars 36 forks source link

Track key combos instead of keys with modifiers #1280

Closed luishfonseca closed 2 months ago

luishfonseca commented 3 months ago

Description

Depends on #1278

Introduces InputCombinations to replace KeyWithModifiers Also closes #1279

Did not test if gamepad was broken with the changes

Checklist

github-actions[bot] commented 3 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1280/ on branch gh-pages at 2024-07-14 19:02 UTC

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0.84034% with 118 lines in your changes missing coverage. Please review.

Project coverage is 35.36%. Comparing base (a84f27d) to head (881dbb8).

Files Patch % Lines
engine/src/input/input.cpp 0.00% 63 Missing :warning:
engine/src/input/combination.cpp 0.00% 31 Missing :warning:
core/src/io/glfw_window.cpp 0.00% 11 Missing :warning:
engine/src/input/action.cpp 0.00% 5 Missing :warning:
engine/src/input/axis.cpp 0.00% 4 Missing :warning:
core/src/data/ser/debug.cpp 33.33% 2 Missing :warning:
engine/include/cubos/engine/input/combination.hpp 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1280 +/- ## ========================================== - Coverage 35.37% 35.36% -0.02% ========================================== Files 369 371 +2 Lines 30636 30653 +17 ========================================== + Hits 10838 10839 +1 - Misses 19798 19814 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

diogomsmiranda commented 2 months ago

I believe Ricardo already approved this on behalf of the team, however we should start normalizing incorporating tests to the each feature related PR we do. It would not only help with reviewing the PR but also help with the lack of current tests we have.

cc @RiscadoA

luishfonseca commented 2 months ago

I believe Ricardo already approved this on behalf of the team, however we should start normalizing incorporating tests to the each feature related PR we do. It would not only help with reviewing the PR but also help with the lack of current tests we have.

I'll be rewriting a lot of the input plugin in one of my next PRs, I'll add tests then. Don't want to write them now as some functionality will change