more progress on the search tab

This commit is contained in:
Manuel Simon Hirsig
2016-02-01 23:33:34 +01:00
parent d7f31c062f
commit e59a6c76c0
5 changed files with 102 additions and 47 deletions
+21
View File
@@ -109,6 +109,27 @@ function m:complete()
end
end
function m:complete_item()
local text = this:GetText()
local item_names = {}
for key, value in Aux.static.auctionable_items do
if type(key) == 'number' then
tinsert(item_names, value.name)
end
end
sort(item_names)
for _, item_name in ipairs(item_names) do
if string.sub(strupper(item_name), 1, strlen(text)) == strupper(text) then
this:SetText(item_name)
this:HighlightText(strlen(text), -1)
return
end
end
end
--StaticPopupDialogs["CANCEL_AUCTION"] = {
-- text = TEXT(CANCEL_AUCTION_CONFIRMATION),
-- button1 = TEXT(ACCEPT),