Skip to content

Commit

Permalink
Polishing gui notes
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktor-obrebski committed Sep 19, 2024
1 parent 5ff4e50 commit 8ad4fa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions gui/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ function NotesWindow:init()
frame={l=0,b=2},
frame_inset={t=1},
row_height=1,
on_select=function (ind, note)
self:loadNote(note)
end,
on_submit=function (ind, note)
self:loadNote(note)
dfhack.gui.pauseRecenter(note.point.pos)
Expand Down Expand Up @@ -300,9 +303,9 @@ function NotesScreen:onInput(keys)
local manager = note_manager.NoteManager{
note=nil,
on_update=function()
self.subviews.notes_window:reloadFilteredNotes()
dfhack.run_command_silent('overlay trigger notes.map_notes')
self:dismiss()
self.subviews.notes_window:reloadFilteredNotes()
self:stopNoteAdd()
end,
on_dismiss=function()
self:stopNoteAdd()
Expand Down
1 change: 0 additions & 1 deletion internal/notes/note_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function NoteManager:init()
frame={t=6,b=3},
frame_style=gui.FRAME_INTERIOR,
init_text=self.note and self.note.point.comment or '',
-- init_cursor=1
},
widgets.Panel{
view_id='buttons',
Expand Down

0 comments on commit 8ad4fa1

Please sign in to comment.