added a module system

This commit is contained in:
Manuel Simon Hirsig
2016-07-14 23:44:01 +02:00
parent 399cae9155
commit 05ca03d559
9 changed files with 133 additions and 44 deletions
+18 -7
View File
@@ -125,13 +125,24 @@ function private.update_auction_listing()
record = auction_record,
})
end
sort(auction_rows, function(a, b) return Aux.sort.multi_lt(
a.record.unit_buyout_price == 0 and Aux.huge or a.record.unit_buyout_price, b.record.unit_buyout_price == 0 and Aux.huge or b.record.unit_buyout_price,
a.record.unit_blizzard_bid, b.record.unit_blizzard_bid,
a.record.stack_size, b.record.stack_size,
b.record.own and 1 or 0, a.record.own and 1 or 0,
a.record.duration, b.record.duration
) end)
sort(auction_rows, function(a, b)
return Aux.sort.multi_lt(
{
a.record.unit_buyout_price == 0 and Aux.huge or a.record.unit_buyout_price,
a.record.unit_blizzard_bid,
a.record.stack_size,
b.record.own and 1 or 0,
a.record.duration,
},
{
b.record.unit_buyout_price == 0 and Aux.huge or b.record.unit_buyout_price,
b.record.unit_blizzard_bid,
b.record.stack_size,
a.record.own and 1 or 0,
b.record.duration,
}
)
end)
end
private.auction_listing:SetData(auction_rows)
end
+1
View File
@@ -78,6 +78,7 @@ function Aux.post_frame.create_frames(private, public)
{ name='Buy/ea', width=.23, align='RIGHT' },
{ name='Buy Pct', width=.12, align='CENTER' }
})
private.auction_listing:EnableSorting(false)
private.auction_listing:DisableSelection(true)
private.auction_listing:SetHandler('OnClick', function(table, row_data, column, button)
local column_index = Aux.util.index_of(column, column.row.cols)
+4 -2
View File
@@ -629,8 +629,9 @@ function Aux.search_frame.create_frames(private, public)
}
private.recent_searches_listing = Aux.listing.CreateScrollingTable(AuxSearchFrameSavedRecent)
private.recent_searches_listing:DisableSelection(true)
private.recent_searches_listing:SetColInfo({{name='Recent Searches', width=1}})
private.recent_searches_listing:EnableSorting(false)
private.recent_searches_listing:DisableSelection(true)
private.recent_searches_listing:SetHandler('OnClick', handlers.OnClick)
private.recent_searches_listing:SetHandler('OnEnter', handlers.OnEnter)
private.recent_searches_listing:SetHandler('OnLeave', handlers.OnLeave)
@@ -638,8 +639,9 @@ function Aux.search_frame.create_frames(private, public)
Aux.gui.vertical_line(AuxSearchFrameSaved, 379)
private.favorite_searches_listing = Aux.listing.CreateScrollingTable(AuxSearchFrameSavedFavorite)
private.favorite_searches_listing:DisableSelection(true)
private.favorite_searches_listing:SetColInfo({{name='Favorite Searches', width=1}})
private.favorite_searches_listing:EnableSorting(false)
private.favorite_searches_listing:DisableSelection(true)
private.favorite_searches_listing:SetHandler('OnClick', handlers.OnClick)
private.favorite_searches_listing:SetHandler('OnEnter', handlers.OnEnter)
private.favorite_searches_listing:SetHandler('OnLeave', handlers.OnLeave)