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

Draft: Feat gui/notes #1297

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3f3514a
Add basic gui/notes tool print notes list and centering on them
wiktor-obrebski Sep 4, 2024
9f10c5d
Improve gui notes searching engine logic
wiktor-obrebski Sep 5, 2024
df9c87b
Prepare size-adjustable note details view for gui/notes
wiktor-obrebski Sep 8, 2024
f480dde
Add a way to update/delete note from the `gui/notes` tool
wiktor-obrebski Sep 8, 2024
47a2270
Make gui/notes center on note on submit
wiktor-obrebski Sep 8, 2024
adebc95
Add note add feature to `gui/notes` tool
wiktor-obrebski Sep 8, 2024
936eed6
Improve gui/notes note list navigation
wiktor-obrebski Sep 9, 2024
3100192
Simplify gui/notes note text preview wrapping feature
wiktor-obrebski Sep 10, 2024
f3b128d
Fix gui/notes issue with initial loading of selected note
wiktor-obrebski Sep 10, 2024
98220c0
Restore way to add notes by `notes add` command
wiktor-obrebski Sep 10, 2024
01fe42c
Add basic documentation for `gui/notes` tool
wiktor-obrebski Sep 10, 2024
5ff4e50
Auto enable notes overlay when `gui/notes` is visible
wiktor-obrebski Sep 10, 2024
8ad4fa1
Polishing gui notes
wiktor-obrebski Sep 19, 2024
5742e4e
Improve gui/notes and gui/journal keyboard control
wiktor-obrebski Sep 19, 2024
9f33beb
Disable up/down control in text field in one-line-mode
wiktor-obrebski Sep 19, 2024
1998f76
Migrate note manager confirmation to ctrl+enter
wiktor-obrebski Sep 19, 2024
aff2ab8
Make `gui/notes` respect the global search settings
wiktor-obrebski Sep 19, 2024
76c70e7
Make gui/notes search for any length of search text
wiktor-obrebski Sep 20, 2024
9eea352
Migrate gui/notes to use widgets TextArea
wiktor-obrebski Jan 12, 2025
5229345
Merge master
wiktor-obrebski Jan 12, 2025
53e4ed2
Migrate notes manager to TextArea widget
wiktor-obrebski Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 30 additions & 51 deletions docs/gui/journal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,68 +8,47 @@ gui/journal
The `gui/journal` interface makes it easy to take notes and document
important details for the fortresses.

With this multi-line text editor, you can keep track of your fortress's
background story, goals, notable events, and both short- and long-term plans.
With this multi-line text editor,
you can keep track of your fortress's background story, goals, notable events,
and both short-term and long-term plans.

This is particularly useful when you need to take a longer break from the game.
Having detailed notes makes it much easier to resume your game after a few
weeks or months without losing track of your progress and objectives.
Having detailed notes makes it much easier to resume your game after
a few weeks or months, without losing track of your progress and objectives.

Supported Features
------------------

- Cursor Control: Navigate through text using arrow keys (Left, Right, Up,
and Down) for precise cursor placement.
- Fast Rewind: Use :kbd:`Ctrl` + :kbd:`Left` and :kbd:`Ctrl` + :kbd:`Right` to
move the cursor one word back or forward.
- Longest X Position Memory: The cursor remembers the longest x position when
moving up or down, making vertical navigation more intuitive.
- Mouse Control: Use the mouse to position the cursor within the text,
providing an alternative to keyboard navigation.
- New Lines: Easily insert new lines using the :kbd:`Enter` key, supporting
multiline text input.
- Text Wrapping: Text automatically wraps within the editor, ensuring lines fit
within the display without manual adjustments.
- Backspace Support: Use the backspace key to delete characters to the left of
the cursor.
- Cursor Control: Navigate through text using arrow keys (left, right, up, down) for precise cursor placement.
- Fast Rewind: Use :kbd:`Ctrl` + :kbd:`Left` / :kbd:`Ctrl` + :kbd:`B` and :kbd:`Ctrl` + :kbd:`Right` / :kbd:`Ctrl` + :kbd:`F` to move the cursor one word back or forward.
- Longest X Position Memory: The cursor remembers the longest x position when moving up or down, making vertical navigation more intuitive.
- Mouse Control: Use the mouse to position the cursor within the text, providing an alternative to keyboard navigation.
- New Lines: Easily insert new lines using the :kbd:`Enter` key, supporting multiline text input.
- Text Wrapping: Text automatically wraps within the editor, ensuring lines fit within the display without manual adjustments.
- Backspace Support: Use the backspace key to delete characters to the left of the cursor.
- Delete Character: :kbd:`Delete` deletes the character under the cursor.
- Line Navigation: :kbd:`Home` moves the cursor to the beginning of the current
line, and :kbd:`End` moves it to the end.
- Delete Current Line: :kbd:`Ctrl` + :kbd:`U` deletes the entire current line
where the cursor is located.
- Delete Rest of Line: :kbd:`Ctrl` + :kbd:`K` deletes text from the cursor to
the end of the line.
- Delete Last Word: :kbd:`Ctrl` + :kbd:`W` removes the word immediately before
the cursor.
- Text Selection: Select text with the mouse, with support for replacing or
removing selected text.
- Jump to Beginning/End: Quickly move the cursor to the beginning or end of the
text using :kbd:`Ctrl` + :kbd:`Home` and :kbd:`Ctrl` + :kbd:`End`.
- Select Word/Line: Use double click to select current word, or triple click to
select current line
- Line Navigation: :kbd:`Home` moves the cursor to the beginning of the current line, and :kbd:`End` moves it to the end.
- Delete Current Line: :kbd:`Ctrl` + :kbd:`U` deletes the entire current line where the cursor is located.
- Delete Rest of Line: :kbd:`Ctrl` + :kbd:`K` deletes text from the cursor to the end of the line.
- Delete Last Word: :kbd:`Ctrl` + :kbd:`W` removes the word immediately before the cursor.
- Text Selection: Select text with the mouse, with support for replacing or removing selected text.
- Jump to Beginning/End: Quickly move the cursor to the beginning or end of the text using :kbd:`Shift` + :kbd:`Up` and :kbd:`Shift` + :kbd:`Down`.
- Select Word/Line: Use double click to select current word, or triple click to select current line
- Select All: Select entire text by :kbd:`Ctrl` + :kbd:`A`
- Undo/Redo: Undo/Redo changes by :kbd:`Ctrl` + :kbd:`Z` / :kbd:`Ctrl` +
:kbd:`Y`
- Clipboard Operations: Perform OS clipboard cut, copy, and paste operations on
selected text, allowing you to paste the copied content into other
applications.
- Undo/Redo: Undo/Redo changes by :kbd:`Ctrl` + :kbd:`Z` / :kbd:`Ctrl` + :kbd:`Y`
- Clipboard Operations: Perform OS clipboard cut, copy, and paste operations on selected text, allowing you to paste the copied content into other applications.
- Copy Text: Use :kbd:`Ctrl` + :kbd:`C` to copy selected text.
- copy selected text, if available
- If no text is selected it copy the entire current line, including the
terminating newline if present.
- copy selected text, if available
- If no text is selected it copy the entire current line, including the terminating newline if present.
- Cut Text: Use :kbd:`Ctrl` + :kbd:`X` to cut selected text.
- cut selected text, if available
- If no text is selected it will cut the entire current line, including the
terminating newline if present
- Paste Text: Use :kbd:`Ctrl` + :kbd:`V` to paste text from the clipboard into
the editor.
- replace selected text, if available
- If no text is selected, paste text in the cursor position
- cut selected text, if available
- If no text is selected it will cut the entire current line, including the terminating newline if present
- Paste Text: Use :kbd:`Ctrl` + :kbd:`V` to paste text from the clipboard into the editor.
- replace selected text, if available
- If no text is selected, paste text in the cursor position
- Scrolling behaviour for long text build-in
- Table of contents (:kbd:`Ctrl` + :kbd:`O`), with headers line prefixed by
``#``, e.g. ``# Fort history``, ``## Year 1``
- Table of contents navigation: jump to previous/next section by :kbd:`Ctrl` +
:kbd:`Up` / :kbd:`Ctrl` + :kbd:`Down`
- Table of contents (:kbd:`Ctrl` + :kbd:`O`), with headers line prefixed by '#', e.g. '# Fort history', '## Year 1'
- Table of contents navigation: jump to previous/next section by :kbd:`Ctrl` + :kbd:`Up` / :kbd:`Ctrl` + :kbd:`Down`

Usage
-----
Expand Down
33 changes: 33 additions & 0 deletions docs/gui/notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
gui/notes
=========

.. dfhack-tool::
:summary: Interactive panel for managing map-specific notes.
:tags: fort interface map

The `gui/notes` tool provides a comprehensive interface for interacting
with map-specific notes. It is designed to streamline the process
of note management in Dwarf Fortress, making it simpler
and more intuitive to keep track of important map-specific information.

This tool builds upon the functionality of the `notes` tool,
enhancing it by providing a user-friendly panel for easier management
and visibility of notes across the Dwarf Fortress game map.

Usage
-----

::

gui/notes

Launch the notes management panel.

Supported Features
------------------

- Interactive Panel: Manage all aspects of notes through a centralized graphical interface.
- Search (:kbd:`Alt` + :kbd:`S`): Quickly find notes
- Direct Map Interaction (:kbd:`Alt` + :kbd:`N`): Add new notes by clicking on the map.
- Edit (:kbd:`Alt` + :kbd:`U`): Easily modify existing notes.
- Delete (:kbd:`Alt` + :kbd:`D`): Easily remove existing notes.
2 changes: 1 addition & 1 deletion docs/notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Creating a Note
1. Use the keyboard cursor to select the desired map tile where you want to place a note.
2. Execute ``notes add`` via the DFHack console.
3. In the pop-up dialog, fill in the note's title and detailed comment.
4. Press :kbd:`Alt` + :kbd:`S` to create the note.
4. Press :kbd:`Ctrl` + :kbd:`Enter` to create the note.

Editing or Deleting a Note
--------------------------
Expand Down
Loading