-
Notifications
You must be signed in to change notification settings - Fork 57
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
New feature: notes page #123
base: master
Are you sure you want to change the base?
Conversation
Notes are displayed on playboard in small letters if the box is otherwise blank. Needed to add to Box.java an across and down clue number and position calculated during setBoxes. Additionally, the PlayboardRenderer draw functions now have two arguments: displayScratchAcross and displayScratchDown to indicate whether to add notes to the board. The drawBox function fetches and renders the scratch notes if required. Two options are needed because it is not pleasing to show the scratch on the notes page for the clue being edited (but you do want to see the scratch for other clues). An option has been added to preferences to enable/disable this behaviour. Default off.
Inspired by issue #124 i've added a preference to display the scratch part of the notes page on the playboard in smaller letters. As per the commit message, this turned out to be more awkward than anticipated and needed a lot of new code, which may or may not be the best approach. Comments welcome. Feel free to accept without this commit (f31bee9). edit: just spotted a small bug, working on it now. |
Bug fixed -- this affects all versions, so commit 7fb08c9 should be applied with anything from this PR. Apologies for the increasingly complex PR! |
Added a notes page activity where notes, partial solutions, and anagrams can be experimented with. I find this useful for cryptic crosswords.
This includes the addition of a NotesActivity class as well as a BoardEditText widget (akin to TextEdit) to edit text in crossword style. I have also added an options menu to the clues list activity, though the only option is to get to the notes page.
Notes are stored in the same file as the user's crossword answers in a section marked with ANTS and DNTS (across/down notes). This is similar to GEXT and if it is not present it is assumed empty. (Ie existing files with previous versions of Shortyz should work perfectly well.)
A smaller technical change is to the PlayboardRenderer class's drawBox method to take the selected square position (used by BoardEditText).
Future work might be to refactor NotesActivity and ClueListActivity to remove a lot of copy-pasted code to do with keyboard handling.
edit: i made an issue earlier asking if i should do this, but i had time today anyway.
editedit: this version still needs longer term testing. Basic features work fine.