case insensitive to npc trade, private channels are now closing

This commit is contained in:
Henrique Santiago
2012-04-30 18:57:17 -03:00
parent beaba25af1
commit 45d3097504
5 changed files with 7 additions and 8 deletions

View File

@@ -170,7 +170,7 @@ local function refreshPlayerGoods()
capacityLabel:setText(string.format('%.2f', playerFreeCapacity) .. ' ' .. WEIGHT_UNIT)
local currentTradeType = getCurrentTradeType()
local searchFilter = searchText:getText()
local searchFilter = searchText:getText():lower()
local foundSelectedItem = false
local items = itemsPanel:getChildCount()
@@ -181,7 +181,7 @@ local function refreshPlayerGoods()
local canTrade = canTradeItem(item)
itemWidget:setEnabled(canTrade)
local searchCondition = (searchFilter == '') or (searchFilter ~= '' and string.find(item.name, searchFilter) ~= nil)
local searchCondition = (searchFilter == '') or (searchFilter ~= '' and string.find(item.name:lower(), searchFilter) ~= nil)
local showAllItemsCondition = (currentTradeType == BUY) or (showAllItems:isChecked()) or (currentTradeType == SELL and not showAllItems:isChecked() and canTrade)
itemWidget:setVisible(searchCondition and showAllItemsCondition)

View File

@@ -6,7 +6,7 @@ NPCOfferLabel < Label
NPCItemBox < UICheckBox
border-width: 1
border-color: #000000
border-color: #000000
color: #aaaaaa
text-align: center
text-offset: 0 20
@@ -88,7 +88,7 @@ MainWindow
type: grid
cell-size: 160 90
flow: true
auto-spacing: true
auto-spacing: true
FlatPanel
id: setupPanel