From 10217270c5ef1d7d563151862cb1814fbe0c20f4 Mon Sep 17 00:00:00 2001 From: ComradeEcho Date: Sun, 2 Apr 2023 11:43:12 -0500 Subject: [PATCH] Insert current preset name in textfield Seems like this would make it a lot more streamlined to load/edit/update presets - not having to manually type in the preset name to update it. --- scripts/gui.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/gui.lua b/scripts/gui.lua index 8a24f98..8593b54 100644 --- a/scripts/gui.lua +++ b/scripts/gui.lua @@ -634,6 +634,8 @@ at_gui.handlers.presets = { local player = e.player local pdata = e.pdata local name = e.element.caption + local textfield = pdata.gui.presets.textfield + textfield.text = name if not e.shift then pdata.selected_presets = {[name] = true} pdata.config_tmp = at_util.copy_preset(pdata.presets[name])