From 82efe9dae085e89415379b4b1c5b3f77adff4db9 Mon Sep 17 00:00:00 2001 From: atom0s Date: Tue, 29 Nov 2016 19:12:00 -0800 Subject: [PATCH] Added enter press on item/keyitem editor lookups. --- itemwatch.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/itemwatch.lua b/itemwatch.lua index d08fe80..ca60fd3 100644 --- a/itemwatch.lua +++ b/itemwatch.lua @@ -501,7 +501,9 @@ function render_items_editor() imgui.Separator(); -- Item search tool.. - imgui.InputText('Item Name', variables['var_ItemLookup'][1], 64); + if (imgui.InputText('Item Name', variables['var_ItemLookup'][1], 64, imgui.bor(ImGuiInputTextFlags_EnterReturnsTrue))) then + itemwatch_settings_items = lists.find_items(imgui.GetVarValue(variables['var_ItemLookup'][1])); + end imgui.SameLine(); show_help('Enter an item name to lookup. (You can use partial names.)'); if (imgui.Button('Search For Item(s)', -1, 18)) then @@ -585,7 +587,9 @@ function render_keyitems_editor() imgui.Separator(); -- Key Item search tool.. - imgui.InputText('Key Item', variables['var_KeyItemLookup'][1], 64); + if (imgui.InputText('Key Item', variables['var_KeyItemLookup'][1], 64, imgui.bor(ImGuiInputTextFlags_EnterReturnsTrue))) then + itemwatch_settings_keys = lists.find_keyitems(imgui.GetVarValue(variables['var_KeyItemLookup'][1])); + end imgui.SameLine(); show_help('Enter a key item name to lookup. (You can use partial names.)'); if (imgui.Button('Search For Key Item(s)', -1, 18)) then