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

Update do_select_screen for general use, apply to some screens #13800

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Apr 23, 2019

The current do_select_screen method requires supporting code to define a bool, check for controller events, properly handle the click, and so on. This PR gathers all the select screen code together so that the selection screen can be re-used with no extra SRAM cost since it re-uses the single bool for all selection screens. Instead of getting the result of do_select_screen and acting upon that, we now pass a "yes" handler and a "no" handler. The handlers can either be void function(void) pointers or lambda functions. Both types are used in the examples included here.

@thinkyhead thinkyhead force-pushed the bf2_select_screens branch 9 times, most recently from a1770f0 to bfe7a4c Compare April 24, 2019 03:41
@thinkyhead thinkyhead merged commit 5051909 into MarlinFirmware:bugfix-2.0.x Apr 24, 2019
@thinkyhead thinkyhead deleted the bf2_select_screens branch April 24, 2019 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant