From 441455ff3f7fb0148396acf5a59c56cdc971d36f Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Tue, 23 Mar 2010 20:04:01 -0400 Subject: [PATCH] In addon:InitializeFrame(): Renamed some variables and changed anchor points for list entries. --- Frame.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Frame.lua b/Frame.lua index 1de1525..d64354c 100644 --- a/Frame.lua +++ b/Frame.lua @@ -3440,24 +3440,26 @@ function addon:InitializeFrame() end for i = 1, NUM_RECIPE_LINES do - local temp_state = GenericCreateButton("ARL_StateButton" .. i, MainPanel.scroll_frame, 16, 16, "GameFontNormalSmall", "GameFontHighlightSmall", - "", "LEFT", "", 2) + local cur_state = GenericCreateButton("ARL_StateButton" .. i, MainPanel.scroll_frame, 16, 16, "GameFontNormalSmall", "GameFontHighlightSmall", + "", "LEFT", "", 2) - local temp_recipe = GenericCreateButton("ARL_RecipeButton" .. i, MainPanel.scroll_frame, 16, 224, "GameFontNormalSmall", "GameFontHighlightSmall", - "Blort", "LEFT", "", 0) + local cur_entry = GenericCreateButton("ARL_RecipeButton" .. i, MainPanel.scroll_frame, 16, 224, "GameFontNormalSmall", "GameFontHighlightSmall", + "Blort", "LEFT", "", 0) if i ~= 1 then - temp_state:SetPoint("TOPLEFT", MainPanel.scroll_frame.state_buttons[i - 1], "BOTTOMLEFT", 0, 3) - temp_recipe:SetPoint("TOPLEFT", MainPanel.scroll_frame.entry_buttons[i - 1], "BOTTOMLEFT", 0, 3) + local prev_state = MainPanel.scroll_frame.state_buttons[i - 1] + + cur_state:SetPoint("TOPLEFT", prev_state, "BOTTOMLEFT", 0, 3) + cur_entry:SetPoint("TOPLEFT", cur_state, "TOPRIGHT", -3, 0) else - temp_state:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 20, -100) - temp_recipe:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 37, -100) + cur_state:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 20, -100) + cur_entry:SetPoint("TOPLEFT", cur_state, "TOPRIGHT", -3, 0) end - temp_state:SetScript("OnClick", ListItem_OnClick) - temp_recipe:SetScript("OnClick", ListItem_OnClick) + cur_state:SetScript("OnClick", ListItem_OnClick) + cur_entry:SetScript("OnClick", ListItem_OnClick) - MainPanel.scroll_frame.state_buttons[i] = temp_state - MainPanel.scroll_frame.entry_buttons[i] = temp_recipe + MainPanel.scroll_frame.state_buttons[i] = cur_state + MainPanel.scroll_frame.entry_buttons[i] = cur_entry end end -- do -- 1.7.9.5