Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This add various page and text editing controls to the Books screen:
Most of the controls are self-explanatory, but Copy generates a sample prefab based on the text you have in the book and adds it to your clipboard, similar to StructuralTemplates. No Gson, so I had to make use of some string manipulation for this. To implement the editing controls, I also had to make changes to some parts of the system, such as the page indexing and updating.
For the editing controls to appear, you need to possess an item with an EditBooksComponent in your inventory. I've added a Quill item, which contains this component. In the future, this could be expanded to other types of writing implements - coloured ink, permanent ink, limited ink, invisible ink. The possibilities are endless! 馃槃
Also added the properties readOnly and title to BookComponent. Titles are displayed on the cover of the book, along with a text about the current status (Editing, Reading or Read-only)
I'm not exactly sure about the title and I'm open to any suggestions. Is adding the property to BookComponent redundant? Maybe it would just be better to use the display name instead? Or should we just do away with the title altogether?
And various misc fixes:
Let me know if there are problems with any of these 馃檪.
Potential ideas to implement
InventoryCell
. Unlike before, there's no event sent when an item is transferred, so for this to be implemented,InventoryCell
might need to be modified.