diff --git a/internal/notes/note_manager.lua b/internal/notes/note_manager.lua index fa0d35807..8d33bcc16 100644 --- a/internal/notes/note_manager.lua +++ b/internal/notes/note_manager.lua @@ -2,6 +2,7 @@ local gui = require('gui') local widgets = require('gui.widgets') +local guidm = require('gui.dwarfmode') local text_editor = reqscript('internal/journal/text_editor') local waypoints = df.global.plotinfo.waypoints diff --git a/notes.lua b/notes.lua index 1d192f34f..c4c9e78b3 100644 --- a/notes.lua +++ b/notes.lua @@ -35,8 +35,12 @@ function NotesOverlay:overlay_onupdate() self:reloadVisibleNotes() end -function NotesOverlay:overlay_trigger(cmd, title) - self:reloadVisibleNotes() +function NotesOverlay:overlay_trigger(cmd) + if cmd == 'add' then + self:showNoteManager() + else + self:reloadVisibleNotes() + end end function NotesOverlay:onInput(keys) @@ -164,7 +168,7 @@ local function main(args) return end - return dfhack.run_command('overlay trigger notes.map_notes add') + return dfhack.run_command_silent('overlay trigger notes.map_notes add') end end