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

Initial mode picker #45

Merged
merged 6 commits into from May 9, 2019
Merged

Initial mode picker #45

merged 6 commits into from May 9, 2019

Conversation

newsch
Copy link
Member

@newsch newsch commented May 6, 2019

I made a rough mode picker interface to use brush mode with, and refactored some of the mode code in the process.

Closes #15.

TODO:

@newsch newsch added the enhancement New feature or request label May 6, 2019
@newsch newsch added this to the MVP milestone May 6, 2019
@newsch newsch added this to To do in Spring 2019 Project Tracking via automation May 6, 2019
@newsch newsch mentioned this pull request May 6, 2019
@newsch
Copy link
Member Author

newsch commented May 6, 2019

In action:
asciicast

@newsch
Copy link
Member Author

newsch commented May 7, 2019

@MatthewBeaudouinLafon and I talked about some next steps: making mode_master more separated from "modes", init/teardown options, and reworking the status window.

@newsch
Copy link
Member Author

newsch commented May 7, 2019

Rebased off of new master

@newsch
Copy link
Member Author

newsch commented May 7, 2019

I refactored some more, 132004a has the details.

@newsch newsch marked this pull request as ready for review May 8, 2019 00:03
@newsch
Copy link
Member Author

newsch commented May 8, 2019

Ready for a look-through, those last two are just formatting changes.

Copy link
Collaborator

@labseven labseven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I added a comment

src/fe_modes.c Outdated Show resolved Hide resolved
Spring 2019 Project Tracking automation moved this from To do to In progress May 8, 2019
newsch added 2 commits May 8, 2019 18:22
Lots of changes here:
- mode functions are now called only with a "reason" and the state
  - reasons are explained more on Line 18 of fe_modes.c
  - the only function that was using canvas_win or status_win was
    mode_brush, which was using it as a hacky way of clearing the
    status window
- declare new functions with mode_function_t in fe_modes.h
- mode_master renamed to master_handler and is now less of a mode.
  - run continuously in main loop
  - grabs keys with wgetch
  - handles global keypresses and UI updates
- mode calling and switching is a little more complex but now
  factored out into call_mode and switch_mode
@newsch
Copy link
Member Author

newsch commented May 9, 2019

Added some changes from comments, this should be good to go

@newsch newsch merged commit c1e9072 into master May 9, 2019
Spring 2019 Project Tracking automation moved this from In progress to Done May 9, 2019
@newsch newsch mentioned this pull request May 9, 2019
6 tasks
@newsch newsch deleted the init-picker branch December 23, 2019 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interface
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Support multiple modes of input
2 participants