autocomplete of item names and exact match in buy tab
This commit is contained in:
@@ -8,5 +8,16 @@ function Aux.util.iter(array)
|
||||
end
|
||||
end
|
||||
|
||||
function Aux.util.dummy()
|
||||
function Aux.util.item_name_autocomplete()
|
||||
local text = this:GetText()
|
||||
local textlen = strlen(text)
|
||||
local name
|
||||
for item_id=1,40000 do
|
||||
name = GetItemInfo(item_id)
|
||||
if name and strfind(strupper(name), '^' .. strupper(text)) then
|
||||
this:SetText(name)
|
||||
this:HighlightText(textlen, -1)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user