From 7c7b14c246af96aaba18f659d2b91082d4fd080c Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 23 Oct 2015 02:16:08 +0200 Subject: [PATCH] some progress with the new UI --- .idea/workspace.xml | 93 ++-- buy.xml | 1155 +++++++++++++++++++++++++------------------ core.lua | 26 +- core.xml | 68 +-- 4 files changed, 779 insertions(+), 563 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a32c3aa..1637d3d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,8 +2,9 @@ - + + @@ -69,8 +70,8 @@ - - + + @@ -79,7 +80,7 @@ - + @@ -119,8 +120,8 @@ - - + + @@ -129,8 +130,8 @@ - - + + @@ -159,8 +160,8 @@ - - + + @@ -183,12 +184,12 @@ @@ -451,14 +452,6 @@ - - - - - - - - @@ -475,14 +468,6 @@ - - - - - - - - @@ -491,22 +476,6 @@ - - - - - - - - - - - - - - - - @@ -523,10 +492,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/buy.xml b/buy.xml index 425865a..c662710 100644 --- a/buy.xml +++ b/buy.xml @@ -39,38 +39,133 @@ - - - - - + + + + + + - this:RegisterForDrag('LeftButton') - this:StartMoving() - this:StopMovingOrSizing() + + this:RegisterForDrag('LeftButton') + + + this:StartMoving() + + + this:StopMovingOrSizing() + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -80,7 +175,7 @@ - + @@ -92,481 +187,603 @@ - - - - - - - - this:SetBackdropBorderColor(0.4, 0.4, 0.4) - this:SetBackdropColor(0.15, 0.15, 0.15) - getglobal(this:GetName().."Title"):SetText('Search Results') - - + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + - local sort_order = Aux.util.map(Aux.buy.modes[1].sort_order, function(column_order) return { column = Aux.buy.modes[1].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) - this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, sort_order, Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave) + Aux.log_frame_load() + + Aux.log_frame_update(arg1) + + + ChatFrame_OnHyperlinkShow(arg1) + + + if arg1 == 1 then + this:ScrollUp() + elseif arg1 == -1 then + this:ScrollDown() + end + - - - - - - - - - local sort_order = Aux.util.map(Aux.buy.modes[2].sort_order, function(column_order) return { column = Aux.buy.modes[2].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) - this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, sort_order, Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave) - - - - - - - - - - - local sort_order = Aux.util.map(Aux.buy.modes[3].sort_order, function(column_order) return { column = Aux.buy.modes[3].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) - this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, sort_order, Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Aux.info.set_game_tooltip(this, this:GetParent().tooltip, 'ANCHOR_LEFT', this:GetParent().EnhTooltip_info) - - - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - SmallMoneyFrame_OnLoad() - MoneyFrame_SetType("STATIC") - - - - - - - - - - - - - - + + - - - - - - - this:SetBackdropBorderColor(0.4, 0.4, 0.4) - this:SetBackdropColor(0.15, 0.15, 0.15) - getglobal(this:GetName().."Title"):SetText('Filters') - - - - - + + + + + + + + + + + + + + + + + + + + + this:SetBackdropBorderColor(0.4, 0.4, 0.4) + getglobal(this:GetName().."Title"):SetText('Filters') + + + + + + + + UIDropDownMenu_SetWidth(140) + UIDropDownMenu_Initialize(this, AuxBuyModeDropDown_Initialize) + UIDropDownMenu_SetSelectedValue(this, 1) + + + UIDropDownMenu_Initialize(this, AuxBuyModeDropDown_Initialize) + + + + + + + + + + + + + + + + + + + + + + + + this.completor = Aux.completion.completor(this) + + + this.completor.suggest() + + + if IsShiftKeyDown() then + this.completor.previous() + else + this.completor.next() + end + + + this.completor.close() + this:ClearFocus() + Aux.buy.SearchButton_onclick() + + + if this.completor.open() then + this.completor.close() + else + this:ClearFocus() + end + + + + + + + + + + + + + + + + + + + + + + + + + + + + UIDropDownMenu_SetWidth(140) + UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize) + + + UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize) + + + + + + + + + UIDropDownMenu_SetWidth(140) + UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize) + + + UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + this:ClearFocus() + + + + + + + + + + + this:ClearFocus() + + + + + + + + + + + + + + + + + + + + + + + + + + + + AuxBuyTooltipButton_OnClick(this) + + + + + + + + UIDropDownMenu_Initialize(this, AuxBuyTooltipDropDown_Initialize) + + + + + + + + + + + + + + + + + + + + + this:EnableMouse(false) + this:SetAlpha(0.5) + + + this:ClearFocus() + + + + + + + + + + + + + + + + AuxBuyPageEditBox:EnableMouse(not this:GetChecked()) + AuxBuyPageEditBox:SetAlpha(this:GetChecked() and 0.5 or 1) + AuxBuyPageEditBox:ClearFocus() + + + + - - - - - - - - - - - - - this.completor = Aux.completion.completor(this) - - - this.completor.suggest() - - - if IsShiftKeyDown() then - this.completor.previous() - else - this.completor.next() - end - - - this.completor.close() - this:ClearFocus() - Aux.buy.SearchButton_onclick() - - - if this.completor.open() then - this.completor.close() - else - this:ClearFocus() - end - - - - - - - - - - - - - - - - - - - - - - - - - - - - UIDropDownMenu_SetWidth(140) - UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize) - - - UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize) - - - - - - - - - UIDropDownMenu_SetWidth(140) - UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize) - - - UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:ClearFocus() - - - - - - - - - - - this:ClearFocus() - - - - - - - - - - - - - - - - - - - - - - - - - - - - AuxBuyTooltipButton_OnClick(this) - - - - - - - - UIDropDownMenu_Initialize(this, AuxBuyTooltipDropDown_Initialize) - - - - - - - - - - - - - - - - - - + + + + + - this:EnableMouse(false) - this:SetAlpha(0.5) + this:SetBackdropBorderColor(0.4, 0.4, 0.4) + getglobal(this:GetName().."Title"):SetText('Search Results') - - this:ClearFocus() - - - - - - - - - - - - + + + + + + + + + local sort_order = Aux.util.map(Aux.buy.modes[1].sort_order, function(column_order) return { column = Aux.buy.modes[1].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) + this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, sort_order, Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave) + + + + + + + + + + + local sort_order = Aux.util.map(Aux.buy.modes[2].sort_order, function(column_order) return { column = Aux.buy.modes[2].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) + this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, sort_order, Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave) + + + + + + + + + + + local sort_order = Aux.util.map(Aux.buy.modes[3].sort_order, function(column_order) return { column = Aux.buy.modes[3].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) + this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, sort_order, Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Aux.info.set_game_tooltip(this, this:GetParent().tooltip, 'ANCHOR_LEFT', this:GetParent().EnhTooltip_info) + + + GameTooltip:Hide() + + + + + + + + + + + + + + + + + + + SmallMoneyFrame_OnLoad() + MoneyFrame_SetType("STATIC") + + + + + + + + + + + + + + + + + + + + - - - - - - - + diff --git a/core.lua b/core.lua index e482de9..ab12b30 100644 --- a/core.lua +++ b/core.lua @@ -84,7 +84,12 @@ function Aux_OnAddonLoaded() Aux.tabs.buy.hiddenElements = { -- AuctionFrameBrowse, - } + } + + Aux.buy.elements = { + AuxBuyFilters, + AuxBuySheetFrame, + } Aux.tabs.sell.recommendationElements = { AuxRecommendText, @@ -99,6 +104,7 @@ function Aux_OnAddonLoaded() end function Aux.log_frame_load() + this:SetFading(false) this:EnableMouseWheel() -- this.flashTimer = 0 TODO remove end @@ -141,8 +147,8 @@ end function Aux.log(msg) local info = ChatTypeInfo["SYSTEM"] - AuxLogFrame:AddMessage(msg, 1, 1, 0) - if not AuxLogFrame:IsVisible() and DEFAULT_CHAT_FRAME then + AuxLogFrameMessageFrame:AddMessage(msg, 1, 1, 0) + if not AuxLogFrameMessageFrame:IsVisible() and DEFAULT_CHAT_FRAME then DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 1, 0) end end @@ -241,6 +247,20 @@ function Aux_OnAuctionHouseClosed() end +function Aux.on_tab_click(button) + + for i=1,4 do + getglobal('AuxTab'..i):SetAlpha(i == this:GetID() and 1 or 0.5) + end + + Aux_HideElems(Aux.buy.elements) + AuxSellPanel:Hide() + if this:GetID() == 1 then + Aux_ShowElems(Aux.buy.elements) + end + +end + function Aux_AuctionFrameTab_OnClick(index) if not index then diff --git a/core.xml b/core.xml index e498066..d21c3cd 100644 --- a/core.xml +++ b/core.xml @@ -16,61 +16,39 @@ - + +