Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add side navigation buttons, functional PIN authentication #6

Closed
wants to merge 5 commits into from

Conversation

MS3FGX
Copy link

@MS3FGX MS3FGX commented Oct 24, 2016

Not sure if this is suitable for merging given the goals of your own personal project, but these are some changes I've made on my own fork and thought at the very least perhaps others looking at the code may be interested in seeing it.

I've added a new asset and some switches in LcarsButton so that it can handle not only the rounded buttons from the original code, but also square "navigation" buttons on the side of the display (which in the original code are just mockups). You need to add a "type" argument when calling LcarsButton (currently either "btn" or "nav"), but its operation is otherwise the same as before.

I've also renamed the existing mock authentication to "Idle", and added in a working authentication screen between it and the main screen (which I've again named authorize.py). This is by no means meant to be an actually secure method of authentication, of course. The PIN can be specified in the authorize.py file, and I tried to use comments to make it clear what needs to be modified. Default PIN is "1234"

@tobykurien
Copy link
Owner

Thanks for this @MS3FGX - I'll have a look and merge. I would certainly prefer that LcarsButton didn't add a new parameter - as this breaks all the code currently using it (yes, I am using this project in other projects too). It would be better if you created LcarsSideButton (for example, I actually called them LcarsBlock... for the various sizes) which just extends the original. I would also prefer that the unused code wasn't removed (I'm happy to move them to another file) as they can be used later, e.g. LcarsElbow allows the elbow element to be clickable and LcarsTab is needed on more complex screens.

@tobykurien
Copy link
Owner

I really like the authorization screen, will manually merge that in. Thanks!

@dgw
Copy link

dgw commented Oct 25, 2016

WRT the new parameter to LcarsButton, why not make shape a kwarg that defaults to 'btn'? That would avoid breaking existing code, but still add the functionality.

@tobykurien
Copy link
Owner

Thanks @dgw I have added a "rectSize" parameter which, if specified, makes a rectangular button. I've also then implemented LcarsBlockLarge, LcarsBlockMedium, and LcarsBlockSmall for the left navigation.

@tobykurien tobykurien closed this Oct 25, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants