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.
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
notes
script #1287notes
script #1287Changes from 4 commits
4102882
4503fc4
ea3b50e
50b53bc
b918760
5109ce5
bedd76d
7a7c6eb
02e1933
37fcaa1
0da7101
7fd812c
30feadb
0f5ab80
cc223f1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The complexity of this loop (which should be using
ipairs
, btw) will grow with the number of notes/squad waypoints that are defined. would it be a good idea to cache them in a nested map structure so you can retrieve a note viasafe_index(self.notes_cache, pos.z, pos.y, pos.x)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I optimized it now in different way - I scan only notes that are visible (and cached before). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mouse-capable way of adding a note is generally expected of current tools. See
gui/blueprint
for a possible example. You click on a button and then click on the map. while the location is being selected, a marker is rendered under the mouse cursor: https://github.com/DFHack/scripts/blob/master/gui/blueprint.lua#L427There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems very good, but for now we do not have any
notes
interface where such button can be placed.Do you think I should replace
notes add
command by mouse cursor selection?Or this should stay as it is and the new way should appear after there will be a
gui/notes
for managing notes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a
gui/notes
entrypoint, but I also think that this dialog should have a way to create (and switch to editing) an additional noteThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be confusing.
You clicked on a note to edit it and in a dialog you have option "New note"? Did you current changes to note saved or not? Do it switch to new note overlay mouse hover mode? etc.
You creating a new note, and got to moment when you see this dialog. Then you switch to editing. What this really means? You are forced to select a note on the screen now? Its sounds very confusing.
If you want to switch to editing - just select a note on the map. You can do this right now, do not need any additional wat to "switch" to it.
--
I never met such features in my web/desktop experience. Edit dialog is for editing, new dialog is for creating.
I believe the needs you speak about will be fully solved by
gui/notes
tool.I though I can create it later, but maybe it should be done from the begining to avoid the confusion.