refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-28 02:23:38 +02:00
parent 15e6e7409a
commit f42e54a4fc
15 changed files with 78 additions and 77 deletions
+5 -5
View File
@@ -533,7 +533,7 @@ function record_percentage(record)
end
function percentage_color(pct)
for i=1,getn(AUCTION_PCT_COLORS) do
for i = 1, getn(AUCTION_PCT_COLORS) do
if pct < AUCTION_PCT_COLORS[i].value then
return AUCTION_PCT_COLORS[i].color
end
@@ -693,7 +693,7 @@ local methods = {
-- Populate the row info from the database by combining identical auctions and auctions
-- of the same base item. Also, get the number of rows which will be shown.
for i=1, getn(records) do
for i = 1, getn(records) do
local record = records[i]
local prevRecord = records[i-1]
if prevRecord and record.search_signature == prevRecord.search_signature then
@@ -903,7 +903,7 @@ local methods = {
RemoveSelectedRecord = function(self, count)
count = count or 1
for i=1, count do
for i = 1, count do
local index = key(self.selected, self.records)
if index then
tremove(self.records, index)
@@ -914,7 +914,7 @@ local methods = {
InsertAuctionRecord = function(self, record, count)
count = count or 1
for i=1, count do
for i = 1, count do
tinsert(self.records, record)
end
self:SetDatabase()
@@ -1089,7 +1089,7 @@ function public.CreateAuctionResultsTable(parent, config)
-- create the rows
rt.rows = {}
for i=1, numRows do
for i = 1, numRows do
local row = CreateFrame('Frame', nil, rt.contentFrame)
row:SetHeight(rt.ROW_HEIGHT)
if i == 1 then
+3 -3
View File
@@ -32,7 +32,7 @@ function LOAD()
DropDownList1:SetHeight(DropDownList1:GetHeight() - 10)
DropDownList1:ClearAllPoints()
DropDownList1:SetPoint('TOPLEFT', dropdown, 'BOTTOMLEFT', -2, -2)
for i=1,UIDROPDOWNMENU_MAXBUTTONS do
for i = 1, UIDROPDOWNMENU_MAXBUTTONS do
local button = _G['DropDownList1Button'..i]
button:SetPoint('TOPLEFT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
button:SetPoint('TOPRIGHT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
@@ -57,7 +57,7 @@ function LOAD()
DropDownList1Backdrop:SetBackdrop(blizzard_backdrop)
aux_border:Hide()
aux_background:Hide()
for i=1,UIDROPDOWNMENU_MAXBUTTONS do
for i = 1, UIDROPDOWNMENU_MAXBUTTONS do
local button = _G['DropDownList1Button'..i]
local text = button:GetFontString()
text:SetFont([[Fonts\FRIZQT__.ttf]], 10)
@@ -100,7 +100,7 @@ do
orig = menu:GetScript 'OnShow'
menu:SetScript('OnShow', function()
UIMenu_Initialize()
for i=1,getn(structure) do
for i = 1, getn(structure) do
UIMenu_AddButton(
structure[i][1],
structure[i],
+2 -2
View File
@@ -104,7 +104,7 @@ local methods = {
st.updateSort = nil
end
for i=1, st.sizes.numRows do
for i = 1, st.sizes.numRows do
st.rows[i].data = nil
if i > getn(st.rowData) then
st.rows[i]:Hide()
@@ -375,7 +375,7 @@ local methods = {
row.cols = {}
st.rows[rowNum] = row
for i=1, getn(st.colInfo) do
for i = 1, getn(st.colInfo) do
st:AddRowCol(rowNum)
end
end,