-
Notifications
You must be signed in to change notification settings - Fork 130
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
[ui] button_group: public state-bitfields and some refactor #864
Conversation
b7f226c
to
f6bc7f5
Compare
6549d04
to
5946a62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine!
5946a62
to
095217b
Compare
Done. Have moved the whole docs into |
7e2b6e5
to
9c379fc
Compare
Also something with the |
c77fdd1
to
7dbceb2
Compare
I've moved internal members completely into private scope. Only the |
7dbceb2
to
55d5911
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Key intent here is to declare the state bitfields (
pressed
,released
,repeated
) public, so i can pass them around for remote interpretation.By the chance, i gave some service: It's more compact and should be easier to read.
Interface is 100% like before except the state-getters returning
bool
, notT
now - Guess that was a mistake.Further Ideas but with API change:
TypeN
-Buttons as template argumenttemplate<std::size_t N>
improves generics: you can easily take theN
from yourenum ButtonIdentifier
.State pressed
,State released
andState repeated
into external struct like it's for modernizedmodm:driver:**
. So it's even easier to pass the states around and follows the convention.