Skip to content

Commit

Permalink
Restore way to add notes by notes add command
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktor-obrebski committed Sep 10, 2024
1 parent 5dd8add commit 582fb1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions internal/notes/note_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 582fb1e

Please sign in to comment.