diff --git a/data/pigui/modules/saveloadgame.lua b/data/pigui/modules/saveloadgame.lua index 33db23747a..6bc0ed7192 100644 --- a/data/pigui/modules/saveloadgame.lua +++ b/data/pigui/modules/saveloadgame.lua @@ -439,15 +439,19 @@ function SaveLoadWindow:drawSaveFooter() ui.sameLine() ui.nextItemWidth(ui.getContentRegion().x - buttonWidths) - local savePath, changed + local savePath, confirmed ui.withStyleVars({ FramePadding = ui.theme.styles.ButtonPadding }, function() - savePath, changed = ui.inputText("##savePath", self.savePath, {}) + savePath, confirmed = ui.inputText("##savePath", self.savePath, { "EnterReturnsTrue" }) end) - if changed then + if savePath ~= self.savePath then self:message("onSavePathChanged", savePath) end + + if confirmed then + self:message("saveToFilePath") + end else ui.dummy(Vector2(ui.getContentRegion().x - buttonWidths, 0)) end