Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Refactoring notes #43

@trentgill

Description

@trentgill

just some notes on the refactor. this can be a thread of ideas / discussion of how to do these things / what order to take things on. etc

grid_actions.lua

Consider restructuring the keyhandling something like:

  1. parse meta mode key
  2. parse alt key
  3. parse global row
  4. else: bank.
  5. determine which bank
  6. subtract y-dimension so all are identical to first bank
  7. call the banks function (main/meta) with an additional argument for bank.

In line 6 or 7 we should also do a rotation of the grid keys so the x&y dimensions match the vertical layout.

These 7ish decisions should be consolidated together and each row should simply call a function that does the appropriate thing. Try and keep it specifically about the decision, and even if the action is a one-liner, put it in a named function that says what's happening.

The idea of the above is to separate the decision tree of which press is happening, from the action of what the press does. Similar to the zilchmos approach where determining which press occurred is separated from what to do in response.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions