last traces of disgusting xml removed
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
module.lua
|
module.lua
|
||||||
init.lua
|
init.lua
|
||||||
core.xml
|
|
||||||
core.lua
|
core.lua
|
||||||
control.lua
|
control.lua
|
||||||
gui.lua
|
gui.lua
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
local m, public, private = aux.module'aux'
|
local m, public, private = aux.module'aux'
|
||||||
|
|
||||||
public.version = '3.9.0'
|
|
||||||
|
|
||||||
public.bids_loaded = false
|
public.bids_loaded = false
|
||||||
public.current_owner_page = nil
|
public.current_owner_page = nil
|
||||||
public.last_owner_page_requested = nil
|
public.last_owner_page_requested = nil
|
||||||
@@ -56,23 +54,50 @@ do
|
|||||||
end)
|
end)
|
||||||
function private.on_tab_click(index)
|
function private.on_tab_click(index)
|
||||||
if active_tab_index then
|
if active_tab_index then
|
||||||
aux.call(m.active_tab.module[1].CLOSE)
|
m.call(m.active_tab.module[1].CLOSE)
|
||||||
end
|
end
|
||||||
active_tab_index = index
|
active_tab_index = index
|
||||||
if active_tab_index then
|
if active_tab_index then
|
||||||
aux.call(m.active_tab.module[1].OPEN)
|
m.call(m.active_tab.module[1].OPEN)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.VARIABLES_LOADED()
|
function public.VARIABLES_LOADED()
|
||||||
m.log('v'..m.version..' loaded.')
|
do
|
||||||
|
local frame = CreateFrame('Frame', nil, UIParent)
|
||||||
aux.gui.set_window_style(AuxFrame)
|
tinsert(UISpecialFrames, frame)
|
||||||
tinsert(UISpecialFrames, 'AuxFrame')
|
m.gui.set_window_style(frame)
|
||||||
|
frame:SetWidth(768)
|
||||||
|
frame:SetHeight(447)
|
||||||
|
frame:SetPoint('LEFT', 100, 0)
|
||||||
|
frame:SetToplevel(true)
|
||||||
|
frame:SetMovable(true)
|
||||||
|
frame:EnableMouse(true)
|
||||||
|
frame:SetClampedToScreen(true)
|
||||||
|
frame:RegisterForDrag('LeftButton')
|
||||||
|
frame:SetScript('OnDragStart', function()
|
||||||
|
this:StartMoving()
|
||||||
|
end)
|
||||||
|
frame:SetScript('OnDragStop', function()
|
||||||
|
this:StopMovingOrSizing()
|
||||||
|
end)
|
||||||
|
frame:SetScript('OnShow', function()
|
||||||
|
PlaySound('AuctionWindowOpen')
|
||||||
|
end)
|
||||||
|
frame:SetScript('OnHide', function()
|
||||||
|
PlaySound('AuctionWindowClose')
|
||||||
|
CloseAuctionHouse()
|
||||||
|
end)
|
||||||
|
frame.content = CreateFrame('Frame', nil, frame)
|
||||||
|
frame.content:SetPoint('TOPLEFT', 4, -80)
|
||||||
|
frame.content:SetPoint('BOTTOMRIGHT', -4, 35)
|
||||||
|
frame:Hide()
|
||||||
|
public.frame = frame
|
||||||
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
local tab_group = m.gui.tab_group(AuxFrame, 'DOWN')
|
local tab_group = m.gui.tab_group(m.frame, 'DOWN')
|
||||||
for _, tab in m.tabs do
|
for _, tab in m.tabs do
|
||||||
tab_group:create_tab(tab.title)
|
tab_group:create_tab(tab.title)
|
||||||
end
|
end
|
||||||
@@ -81,17 +106,17 @@ function public.VARIABLES_LOADED()
|
|||||||
end
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
local btn = m.gui.button(AuxFrame, 16)
|
local btn = m.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('BOTTOMRIGHT', -6, 6)
|
btn:SetPoint('BOTTOMRIGHT', -6, 6)
|
||||||
btn:SetWidth(65)
|
btn:SetWidth(65)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Close')
|
btn:SetText('Close')
|
||||||
btn:SetScript('OnClick', m._(HideUIPanel, AuxFrame))
|
btn:SetScript('OnClick', m._(HideUIPanel, m.frame))
|
||||||
public.close_button = btn
|
public.close_button = btn
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
local btn = m.gui.button(AuxFrame, 16)
|
local btn = m.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('RIGHT', m.close_button, 'LEFT' , -5, 0)
|
btn:SetPoint('RIGHT', m.close_button, 'LEFT' , -5, 0)
|
||||||
btn:SetWidth(65)
|
btn:SetWidth(65)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
@@ -110,7 +135,7 @@ function private.AUCTION_HOUSE_SHOW()
|
|||||||
if AuctionFrame:IsVisible() then
|
if AuctionFrame:IsVisible() then
|
||||||
AuctionFrame:Hide()
|
AuctionFrame:Hide()
|
||||||
end
|
end
|
||||||
AuxFrame:Show()
|
m.frame:Show()
|
||||||
m.tab_group:set_tab(1)
|
m.tab_group:set_tab(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -121,7 +146,7 @@ function private.AUCTION_HOUSE_CLOSED()
|
|||||||
m.stack.stop()
|
m.stack.stop()
|
||||||
m.scan.abort()
|
m.scan.abort()
|
||||||
m.tab_group:set_tab()
|
m.tab_group:set_tab()
|
||||||
AuxFrame:Hide()
|
m.frame:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
function private.AUCTION_BIDDER_LIST_UPDATE()
|
function private.AUCTION_BIDDER_LIST_UPDATE()
|
||||||
@@ -301,7 +326,7 @@ do
|
|||||||
|
|
||||||
m.control.event_listener('CHAT_MSG_SYSTEM', function(kill)
|
m.control.event_listener('CHAT_MSG_SYSTEM', function(kill)
|
||||||
if arg1 == ERR_AUCTION_BID_PLACED then
|
if arg1 == ERR_AUCTION_BID_PLACED then
|
||||||
aux.call(on_success)
|
m.call(on_success)
|
||||||
locked = false
|
locked = false
|
||||||
kill()
|
kill()
|
||||||
end
|
end
|
||||||
@@ -400,7 +425,7 @@ end
|
|||||||
|
|
||||||
function public.is_player(name, current)
|
function public.is_player(name, current)
|
||||||
local realm = GetCVar('realmName')
|
local realm = GetCVar('realmName')
|
||||||
return not current and aux.index(aux_characters, realm, name) or UnitName('player') == name
|
return not current and m.index(aux_characters, realm, name) or UnitName('player') == name
|
||||||
end
|
end
|
||||||
|
|
||||||
function public.modified()
|
function public.modified()
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
|
|
||||||
<Frame name="AuxFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent" clampedToScreen="true">
|
|
||||||
<Size><AbsDimension x="768" y="447"/></Size>
|
|
||||||
<Anchors>
|
|
||||||
<Anchor point="LEFT">
|
|
||||||
<Offset>
|
|
||||||
<AbsDimension x="100" y="0"/>
|
|
||||||
</Offset>
|
|
||||||
</Anchor>
|
|
||||||
</Anchors>
|
|
||||||
<Scripts>
|
|
||||||
<OnLoad>
|
|
||||||
this:RegisterForDrag('LeftButton')
|
|
||||||
</OnLoad>
|
|
||||||
<OnShow>
|
|
||||||
PlaySound('AuctionWindowOpen')
|
|
||||||
</OnShow>
|
|
||||||
<OnHide>
|
|
||||||
PlaySound('AuctionWindowClose')
|
|
||||||
CloseAuctionHouse()
|
|
||||||
</OnHide>
|
|
||||||
<OnDragStart>
|
|
||||||
this:StartMoving()
|
|
||||||
</OnDragStart>
|
|
||||||
<OnDragStop>
|
|
||||||
this:StopMovingOrSizing()
|
|
||||||
</OnDragStop>
|
|
||||||
</Scripts>
|
|
||||||
<Frames>
|
|
||||||
<Frame name="$parentContent">
|
|
||||||
<Anchors>
|
|
||||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="4" y="-80"/></Offset></Anchor>
|
|
||||||
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-4" y="35"/></Offset></Anchor>
|
|
||||||
</Anchors>
|
|
||||||
</Frame>
|
|
||||||
</Frames>
|
|
||||||
</Frame>
|
|
||||||
</Ui>
|
|
||||||
@@ -2,6 +2,8 @@ local module = aux_module()
|
|||||||
aux = tremove(module, 1)
|
aux = tremove(module, 1)
|
||||||
local m, public, private = unpack(module)
|
local m, public, private = unpack(module)
|
||||||
|
|
||||||
|
public.version = '3.9.0'
|
||||||
|
|
||||||
local function initialize_module(private_declarator)
|
local function initialize_module(private_declarator)
|
||||||
private_declarator.LOAD = nil
|
private_declarator.LOAD = nil
|
||||||
end
|
end
|
||||||
@@ -34,6 +36,7 @@ event_frame:SetScript('OnEvent', function()
|
|||||||
module[1].LOAD()
|
module[1].LOAD()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
m.log('v'..m.version..' loaded.')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ local m, public, private = aux.tab(3, 'Auctions', 'auctions_tab')
|
|||||||
|
|
||||||
private.auction_records = nil
|
private.auction_records = nil
|
||||||
|
|
||||||
|
function m.LOAD()
|
||||||
|
m.create_frames()
|
||||||
|
end
|
||||||
|
|
||||||
function m.OPEN()
|
function m.OPEN()
|
||||||
m.frame:Show()
|
m.frame:Show()
|
||||||
m.scan_auctions()
|
m.scan_auctions()
|
||||||
|
|||||||
+49
-47
@@ -1,53 +1,55 @@
|
|||||||
local m, public, private = aux.module'auctions_tab'
|
local m, public, private = aux.module'auctions_tab'
|
||||||
|
|
||||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
function private.create_frames()
|
||||||
m.frame:SetAllPoints()
|
private.frame = CreateFrame('Frame', nil, aux.frame)
|
||||||
m.frame:SetScript('OnUpdate', m.on_update)
|
m.frame:SetAllPoints()
|
||||||
m.frame:Hide()
|
m.frame:SetScript('OnUpdate', m.on_update)
|
||||||
|
m.frame:Hide()
|
||||||
|
|
||||||
m.frame.listing = aux.gui.panel(m.frame)
|
m.frame.listing = aux.gui.panel(m.frame)
|
||||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
m.frame.listing:SetPoint('TOP', aux.frame, 'TOP', 0, -8)
|
||||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
m.frame.listing:SetPoint('BOTTOMLEFT', aux.frame.content, 'BOTTOMLEFT', 0, 0)
|
||||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
m.frame.listing:SetPoint('BOTTOMRIGHT', aux.frame.content, 'BOTTOMRIGHT', 0, 0)
|
||||||
|
|
||||||
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.auctions_config)
|
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.auctions_config)
|
||||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||||
m.listing:Reset()
|
m.listing:Reset()
|
||||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||||
if IsAltKeyDown() and m.listing:GetSelection().record == cell.row.data.record and m.cancel_button:IsEnabled() then
|
if IsAltKeyDown() and m.listing:GetSelection().record == cell.row.data.record and m.cancel_button:IsEnabled() then
|
||||||
m.cancel_button:Click()
|
m.cancel_button:Click()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
m.listing:SetHandler('OnSelectionChanged', function(rt, datum)
|
m.listing:SetHandler('OnSelectionChanged', function(rt, datum)
|
||||||
if not datum then return end
|
if not datum then return end
|
||||||
m.find_auction(datum.record)
|
m.find_auction(datum.record)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
do
|
do
|
||||||
local status_bar = aux.gui.status_bar(m.frame)
|
local status_bar = aux.gui.status_bar(m.frame)
|
||||||
status_bar:SetWidth(265)
|
status_bar:SetWidth(265)
|
||||||
status_bar:SetHeight(25)
|
status_bar:SetHeight(25)
|
||||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
status_bar:SetPoint('TOPLEFT', aux.frame.content, 'BOTTOMLEFT', 0, -6)
|
||||||
status_bar:update_status(100, 100)
|
status_bar:update_status(100, 100)
|
||||||
status_bar:set_text('')
|
status_bar:set_text('')
|
||||||
private.status_bar = status_bar
|
private.status_bar = status_bar
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame, 16)
|
local btn = aux.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Cancel')
|
btn:SetText('Cancel')
|
||||||
btn:Disable()
|
btn:Disable()
|
||||||
private.cancel_button = btn
|
private.cancel_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame, 16)
|
local btn = aux.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.cancel_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.cancel_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Refresh')
|
btn:SetText('Refresh')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
m.scan_auctions()
|
m.scan_auctions()
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -2,6 +2,10 @@ local m, public, private = aux.tab(4, 'Bids', 'bids_tab')
|
|||||||
|
|
||||||
private.auction_records = nil
|
private.auction_records = nil
|
||||||
|
|
||||||
|
function m.LOAD()
|
||||||
|
m.create_frames()
|
||||||
|
end
|
||||||
|
|
||||||
function m.OPEN()
|
function m.OPEN()
|
||||||
m.frame:Show()
|
m.frame:Show()
|
||||||
m.scan_bids()
|
m.scan_bids()
|
||||||
|
|||||||
+62
-60
@@ -1,66 +1,68 @@
|
|||||||
local m, public, private = aux.module'bids_tab'
|
local m, public, private = aux.module'bids_tab'
|
||||||
|
|
||||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
function private.create_frames()
|
||||||
m.frame:SetAllPoints()
|
private.frame = CreateFrame('Frame', nil, aux.frame)
|
||||||
m.frame:SetScript('OnUpdate', m.on_update)
|
m.frame:SetAllPoints()
|
||||||
m.frame:Hide()
|
m.frame:SetScript('OnUpdate', m.on_update)
|
||||||
|
m.frame:Hide()
|
||||||
|
|
||||||
m.frame.listing = aux.gui.panel(m.frame)
|
m.frame.listing = aux.gui.panel(m.frame)
|
||||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
m.frame.listing:SetPoint('TOP', aux.frame, 'TOP', 0, -8)
|
||||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
m.frame.listing:SetPoint('BOTTOMLEFT', aux.frame.content, 'BOTTOMLEFT', 0, 0)
|
||||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
m.frame.listing:SetPoint('BOTTOMRIGHT', aux.frame.content, 'BOTTOMRIGHT', 0, 0)
|
||||||
|
|
||||||
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.bids_config)
|
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.bids_config)
|
||||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||||
m.listing:Reset()
|
m.listing:Reset()
|
||||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||||
if IsAltKeyDown() and m.listing:GetSelection().record == cell.row.data.record then
|
if IsAltKeyDown() and m.listing:GetSelection().record == cell.row.data.record then
|
||||||
if button == 'LeftButton' and m.buyout_button:IsEnabled() then
|
if button == 'LeftButton' and m.buyout_button:IsEnabled() then
|
||||||
m.buyout_button:Click()
|
m.buyout_button:Click()
|
||||||
elseif button == 'RightButton' and m.bid_button:IsEnabled() then
|
elseif button == 'RightButton' and m.bid_button:IsEnabled() then
|
||||||
m.bid_button:Click()
|
m.bid_button:Click()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
m.listing:SetHandler('OnSelectionChanged', function(rt, datum)
|
m.listing:SetHandler('OnSelectionChanged', function(rt, datum)
|
||||||
if not datum then return end
|
if not datum then return end
|
||||||
m.find_auction(datum.record)
|
m.find_auction(datum.record)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
do
|
do
|
||||||
local status_bar = aux.gui.status_bar(m.frame)
|
local status_bar = aux.gui.status_bar(m.frame)
|
||||||
status_bar:SetWidth(265)
|
status_bar:SetWidth(265)
|
||||||
status_bar:SetHeight(25)
|
status_bar:SetHeight(25)
|
||||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
status_bar:SetPoint('TOPLEFT', aux.frame.content, 'BOTTOMLEFT', 0, -6)
|
||||||
status_bar:update_status(100, 0)
|
status_bar:update_status(100, 0)
|
||||||
status_bar:set_text('')
|
status_bar:set_text('')
|
||||||
private.status_bar = status_bar
|
private.status_bar = status_bar
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame, 16)
|
local btn = aux.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Bid')
|
btn:SetText('Bid')
|
||||||
btn:Disable()
|
btn:Disable()
|
||||||
private.bid_button = btn
|
private.bid_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame, 16)
|
local btn = aux.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.bid_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.bid_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Buyout')
|
btn:SetText('Buyout')
|
||||||
btn:Disable()
|
btn:Disable()
|
||||||
private.buyout_button = btn
|
private.buyout_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame, 16)
|
local btn = aux.gui.button(m.frame, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.buyout_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.buyout_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Refresh')
|
btn:SetText('Refresh')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
m.scan_bids()
|
m.scan_bids()
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -9,6 +9,10 @@ private.scan_id = 0
|
|||||||
private.selected_item = nil
|
private.selected_item = nil
|
||||||
private.refresh = nil
|
private.refresh = nil
|
||||||
|
|
||||||
|
function m.LOAD()
|
||||||
|
m.create_frames()
|
||||||
|
end
|
||||||
|
|
||||||
function m.OPEN()
|
function m.OPEN()
|
||||||
m.frame:Show()
|
m.frame:Show()
|
||||||
|
|
||||||
|
|||||||
+324
-322
@@ -1,334 +1,336 @@
|
|||||||
local m, public, private = aux.module'post_tab'
|
local m, public, private = aux.module'post_tab'
|
||||||
|
|
||||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
function private.create_frames()
|
||||||
m.frame:SetAllPoints()
|
private.frame = CreateFrame('Frame', nil, aux.frame)
|
||||||
m.frame:SetScript('OnUpdate', m.on_update)
|
m.frame:SetAllPoints()
|
||||||
m.frame:Hide()
|
m.frame:SetScript('OnUpdate', m.on_update)
|
||||||
|
m.frame:Hide()
|
||||||
|
|
||||||
m.frame.content = CreateFrame('Frame', nil, m.frame)
|
m.frame.content = CreateFrame('Frame', nil, m.frame)
|
||||||
m.frame.content:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
m.frame.content:SetPoint('TOP', aux.frame, 'TOP', 0, -8)
|
||||||
m.frame.content:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
m.frame.content:SetPoint('BOTTOMLEFT', aux.frame.content, 'BOTTOMLEFT', 0, 0)
|
||||||
m.frame.content:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
m.frame.content:SetPoint('BOTTOMRIGHT', aux.frame.content, 'BOTTOMRIGHT', 0, 0)
|
||||||
|
|
||||||
m.frame.inventory = aux.gui.panel(m.frame.content)
|
m.frame.inventory = aux.gui.panel(m.frame.content)
|
||||||
m.frame.inventory:SetWidth(212)
|
m.frame.inventory:SetWidth(212)
|
||||||
m.frame.inventory:SetPoint('TOPLEFT', 0, 0)
|
m.frame.inventory:SetPoint('TOPLEFT', 0, 0)
|
||||||
m.frame.inventory:SetPoint('BOTTOMLEFT', 0, 0)
|
m.frame.inventory:SetPoint('BOTTOMLEFT', 0, 0)
|
||||||
|
|
||||||
m.frame.parameters = aux.gui.panel(m.frame.content)
|
m.frame.parameters = aux.gui.panel(m.frame.content)
|
||||||
m.frame.parameters:SetHeight(173)
|
m.frame.parameters:SetHeight(173)
|
||||||
m.frame.parameters:SetPoint('TOPLEFT', m.frame.inventory, 'TOPRIGHT', 2.5, 0)
|
m.frame.parameters:SetPoint('TOPLEFT', m.frame.inventory, 'TOPRIGHT', 2.5, 0)
|
||||||
m.frame.parameters:SetPoint('TOPRIGHT', 0, 0)
|
m.frame.parameters:SetPoint('TOPRIGHT', 0, 0)
|
||||||
|
|
||||||
m.frame.auctions = aux.gui.panel(m.frame.content)
|
m.frame.auctions = aux.gui.panel(m.frame.content)
|
||||||
m.frame.auctions:SetHeight(228)
|
m.frame.auctions:SetHeight(228)
|
||||||
m.frame.auctions:SetPoint('BOTTOMLEFT', m.frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
m.frame.auctions:SetPoint('BOTTOMLEFT', m.frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
||||||
m.frame.auctions:SetPoint('BOTTOMRIGHT', 0, 0)
|
m.frame.auctions:SetPoint('BOTTOMRIGHT', 0, 0)
|
||||||
|
|
||||||
do
|
do
|
||||||
local checkbox = aux.gui.checkbox(m.frame.inventory)
|
local checkbox = aux.gui.checkbox(m.frame.inventory)
|
||||||
checkbox:SetPoint('TOPLEFT', 49, -16)
|
checkbox:SetPoint('TOPLEFT', 49, -16)
|
||||||
checkbox:SetScript('OnClick', function()
|
checkbox:SetScript('OnClick', function()
|
||||||
m.refresh = true
|
m.refresh = true
|
||||||
end)
|
end)
|
||||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
||||||
label:SetText('Show hidden items')
|
label:SetText('Show hidden items')
|
||||||
private.show_hidden_checkbox = checkbox
|
private.show_hidden_checkbox = checkbox
|
||||||
end
|
end
|
||||||
|
|
||||||
aux.gui.horizontal_line(m.frame.inventory, -48)
|
aux.gui.horizontal_line(m.frame.inventory, -48)
|
||||||
|
|
||||||
private.item_listing = aux.item_listing.create(
|
private.item_listing = aux.item_listing.create(
|
||||||
m.frame.inventory,
|
m.frame.inventory,
|
||||||
function()
|
function()
|
||||||
if arg1 == 'LeftButton' then
|
if arg1 == 'LeftButton' then
|
||||||
m.set_item(this.item_record)
|
m.set_item(this.item_record)
|
||||||
elseif arg1 == 'RightButton' then
|
elseif arg1 == 'RightButton' then
|
||||||
aux.tab_group:set_tab(1)
|
aux.tab_group:set_tab(1)
|
||||||
aux.search_tab.set_filter(strlower(aux.info.item(this.item_record.item_id).name)..'/exact')
|
aux.search_tab.set_filter(strlower(aux.info.item(this.item_record.item_id).name)..'/exact')
|
||||||
aux.search_tab.execute(nil, false)
|
aux.search_tab.execute(nil, false)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
function(item_record)
|
function(item_record)
|
||||||
return item_record == m.selected_item
|
return item_record == m.selected_item
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
private.auction_listing = aux.listing.CreateScrollingTable(m.frame.auctions)
|
private.auction_listing = aux.listing.CreateScrollingTable(m.frame.auctions)
|
||||||
m.auction_listing:SetColInfo({
|
m.auction_listing:SetColInfo({
|
||||||
{ name='Auctions', width=.12, align='CENTER' },
|
{ name='Auctions', width=.12, align='CENTER' },
|
||||||
{ name='Left', width=.1, align='CENTER' },
|
{ name='Left', width=.1, align='CENTER' },
|
||||||
{ name='Qty', width=.08, align='CENTER' },
|
{ name='Qty', width=.08, align='CENTER' },
|
||||||
{ name='Bid/ea', width=.22, align='RIGHT' },
|
{ name='Bid/ea', width=.22, align='RIGHT' },
|
||||||
{ name='Bid Pct', width=.13, align='CENTER' },
|
{ name='Bid Pct', width=.13, align='CENTER' },
|
||||||
{ name='Buy/ea', width=.22, align='RIGHT' },
|
{ name='Buy/ea', width=.22, align='RIGHT' },
|
||||||
{ name='Buy Pct', width=.13, align='CENTER' }
|
{ name='Buy Pct', width=.13, align='CENTER' }
|
||||||
})
|
})
|
||||||
m.auction_listing:EnableSorting(false)
|
m.auction_listing:EnableSorting(false)
|
||||||
m.auction_listing:DisableSelection(true)
|
m.auction_listing:DisableSelection(true)
|
||||||
m.auction_listing:SetHandler('OnClick', function(table, row_data, column, button)
|
m.auction_listing:SetHandler('OnClick', function(table, row_data, column, button)
|
||||||
local column_index = aux.util.key(column, column.row.cols)
|
local column_index = aux.util.key(column, column.row.cols)
|
||||||
local unit_start_price, unit_buyout_price = m.undercut(row_data.record, m.stack_size_slider:GetValue(), button == 'RightButton')
|
local unit_start_price, unit_buyout_price = m.undercut(row_data.record, m.stack_size_slider:GetValue(), button == 'RightButton')
|
||||||
if column_index == 3 then
|
if column_index == 3 then
|
||||||
m.stack_size_slider:SetValue(row_data.record.stack_size)
|
m.stack_size_slider:SetValue(row_data.record.stack_size)
|
||||||
elseif column_index == 4 then
|
elseif column_index == 4 then
|
||||||
m.set_unit_start_price(unit_start_price)
|
m.set_unit_start_price(unit_start_price)
|
||||||
elseif column_index == 6 then
|
elseif column_index == 6 then
|
||||||
m.set_unit_buyout_price(unit_buyout_price)
|
m.set_unit_buyout_price(unit_buyout_price)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
do
|
do
|
||||||
local status_bar = aux.gui.status_bar(m.frame)
|
local status_bar = aux.gui.status_bar(m.frame)
|
||||||
status_bar:SetWidth(265)
|
status_bar:SetWidth(265)
|
||||||
status_bar:SetHeight(25)
|
status_bar:SetHeight(25)
|
||||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
status_bar:SetPoint('TOPLEFT', aux.frame.content, 'BOTTOMLEFT', 0, -6)
|
||||||
status_bar:update_status(100, 100)
|
status_bar:update_status(100, 100)
|
||||||
status_bar:set_text('')
|
status_bar:set_text('')
|
||||||
private.status_bar = status_bar
|
private.status_bar = status_bar
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame.parameters, 16)
|
local btn = aux.gui.button(m.frame.parameters, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Post')
|
btn:SetText('Post')
|
||||||
btn:SetScript('OnClick', m.post_auctions)
|
btn:SetScript('OnClick', m.post_auctions)
|
||||||
private.post_button = btn
|
private.post_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame.parameters, 16)
|
local btn = aux.gui.button(m.frame.parameters, 16)
|
||||||
btn:SetPoint('TOPLEFT', m.post_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', m.post_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(80)
|
btn:SetWidth(80)
|
||||||
btn:SetHeight(24)
|
btn:SetHeight(24)
|
||||||
btn:SetText('Refresh')
|
btn:SetText('Refresh')
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
aux.scan.abort(m.scan_id)
|
aux.scan.abort(m.scan_id)
|
||||||
m.refresh_entries()
|
m.refresh_entries()
|
||||||
m.refresh = true
|
m.refresh = true
|
||||||
end)
|
end)
|
||||||
private.refresh_button = btn
|
private.refresh_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local item = aux.gui.item(m.frame.parameters)
|
local item = aux.gui.item(m.frame.parameters)
|
||||||
item:SetPoint('TOPLEFT', 6, -6)
|
item:SetPoint('TOPLEFT', 6, -6)
|
||||||
item.button:SetScript('OnEnter', function()
|
item.button:SetScript('OnEnter', function()
|
||||||
if m.selected_item then
|
if m.selected_item then
|
||||||
aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
|
aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
item.button:SetScript('OnLeave', function()
|
item.button:SetScript('OnLeave', function()
|
||||||
GameTooltip:Hide()
|
GameTooltip:Hide()
|
||||||
end)
|
end)
|
||||||
private.item = item
|
private.item = item
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local slider = aux.gui.slider(m.frame.parameters)
|
local slider = aux.gui.slider(m.frame.parameters)
|
||||||
slider:SetValueStep(1)
|
slider:SetValueStep(1)
|
||||||
slider:SetPoint('TOPLEFT', 13, -73)
|
slider:SetPoint('TOPLEFT', 13, -73)
|
||||||
slider:SetWidth(190)
|
slider:SetWidth(190)
|
||||||
slider:SetScript('OnValueChanged', function()
|
slider:SetScript('OnValueChanged', function()
|
||||||
m.quantity_update(true)
|
m.quantity_update(true)
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetScript('OnTextChanged', function()
|
slider.editbox:SetScript('OnTextChanged', function()
|
||||||
slider:SetValue(this:GetNumber())
|
slider:SetValue(this:GetNumber())
|
||||||
m.quantity_update(true)
|
m.quantity_update(true)
|
||||||
if m.selected_item then
|
if m.selected_item then
|
||||||
local settings = m.read_settings()
|
local settings = m.read_settings()
|
||||||
settings.stack_size = this:GetNumber()
|
settings.stack_size = this:GetNumber()
|
||||||
m.write_settings(settings)
|
m.write_settings(settings)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetScript('OnTabPressed', function()
|
slider.editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
m.unit_buyout_price:SetFocus()
|
m.unit_buyout_price:SetFocus()
|
||||||
elseif m.stack_count_slider.editbox:IsVisible() then
|
elseif m.stack_count_slider.editbox:IsVisible() then
|
||||||
m.stack_count_slider.editbox:SetFocus()
|
m.stack_count_slider.editbox:SetFocus()
|
||||||
else
|
else
|
||||||
m.unit_start_price:SetFocus()
|
m.unit_start_price:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetNumeric(true)
|
slider.editbox:SetNumeric(true)
|
||||||
slider.editbox:SetMaxLetters(3)
|
slider.editbox:SetMaxLetters(3)
|
||||||
slider.label:SetText('Stack Size')
|
slider.label:SetText('Stack Size')
|
||||||
private.stack_size_slider = slider
|
private.stack_size_slider = slider
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local slider = aux.gui.slider(m.frame.parameters)
|
local slider = aux.gui.slider(m.frame.parameters)
|
||||||
slider:SetValueStep(1)
|
slider:SetValueStep(1)
|
||||||
slider:SetPoint('TOPLEFT', m.stack_size_slider, 'BOTTOMLEFT', 0, -30)
|
slider:SetPoint('TOPLEFT', m.stack_size_slider, 'BOTTOMLEFT', 0, -30)
|
||||||
slider:SetWidth(190)
|
slider:SetWidth(190)
|
||||||
slider:SetScript('OnValueChanged', function()
|
slider:SetScript('OnValueChanged', function()
|
||||||
m.quantity_update()
|
m.quantity_update()
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetScript('OnTextChanged', function()
|
slider.editbox:SetScript('OnTextChanged', function()
|
||||||
slider:SetValue(this:GetNumber())
|
slider:SetValue(this:GetNumber())
|
||||||
m.quantity_update()
|
m.quantity_update()
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetScript('OnTabPressed', function()
|
slider.editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
m.stack_size_slider.editbox:SetFocus()
|
m.stack_size_slider.editbox:SetFocus()
|
||||||
else
|
else
|
||||||
m.unit_start_price:SetFocus()
|
m.unit_start_price:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
slider.editbox:SetNumeric(true)
|
slider.editbox:SetNumeric(true)
|
||||||
slider.label:SetText('Stack Count')
|
slider.label:SetText('Stack Count')
|
||||||
private.stack_count_slider = slider
|
private.stack_count_slider = slider
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local dropdown = aux.gui.dropdown(m.frame.parameters)
|
local dropdown = aux.gui.dropdown(m.frame.parameters)
|
||||||
dropdown:SetPoint('TOPLEFT', m.stack_count_slider, 'BOTTOMLEFT', 0, -21)
|
dropdown:SetPoint('TOPLEFT', m.stack_count_slider, 'BOTTOMLEFT', 0, -21)
|
||||||
dropdown:SetWidth(90)
|
dropdown:SetWidth(90)
|
||||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -1)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -1)
|
||||||
label:SetText('Duration')
|
label:SetText('Duration')
|
||||||
UIDropDownMenu_Initialize(dropdown, m.initialize_duration_dropdown)
|
UIDropDownMenu_Initialize(dropdown, m.initialize_duration_dropdown)
|
||||||
dropdown:SetScript('OnShow', function()
|
dropdown:SetScript('OnShow', function()
|
||||||
UIDropDownMenu_Initialize(this, m.initialize_duration_dropdown)
|
UIDropDownMenu_Initialize(this, m.initialize_duration_dropdown)
|
||||||
end)
|
end)
|
||||||
local label = aux.gui.label(dropdown, aux.gui.config.medium_font_size)
|
local label = aux.gui.label(dropdown, aux.gui.config.medium_font_size)
|
||||||
label:SetPoint('LEFT', dropdown, 'RIGHT', 25, 0)
|
label:SetPoint('LEFT', dropdown, 'RIGHT', 25, 0)
|
||||||
private.deposit = label
|
private.deposit = label
|
||||||
private.duration_dropdown = dropdown
|
private.duration_dropdown = dropdown
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local checkbox = aux.gui.checkbox(m.frame.parameters)
|
local checkbox = aux.gui.checkbox(m.frame.parameters)
|
||||||
checkbox:SetPoint('TOPRIGHT', -83, -6)
|
checkbox:SetPoint('TOPRIGHT', -83, -6)
|
||||||
checkbox:SetScript('OnClick', function()
|
checkbox:SetScript('OnClick', function()
|
||||||
local settings = m.read_settings()
|
local settings = m.read_settings()
|
||||||
settings.hidden = this:GetChecked()
|
settings.hidden = this:GetChecked()
|
||||||
m.write_settings(settings)
|
m.write_settings(settings)
|
||||||
m.refresh = true
|
m.refresh = true
|
||||||
end)
|
end)
|
||||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
||||||
label:SetText('Hide this item')
|
label:SetText('Hide this item')
|
||||||
private.hide_checkbox = checkbox
|
private.hide_checkbox = checkbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local frame = CreateFrame('Frame', nil, m.frame.parameters)
|
local frame = CreateFrame('Frame', nil, m.frame.parameters)
|
||||||
private.start_price_frame = frame
|
private.start_price_frame = frame
|
||||||
aux.gui.set_content_style(frame)
|
aux.gui.set_content_style(frame)
|
||||||
frame:SetPoint('TOPRIGHT', -71, -50)
|
frame:SetPoint('TOPRIGHT', -71, -50)
|
||||||
frame:SetWidth(180)
|
frame:SetWidth(180)
|
||||||
frame:SetHeight(22)
|
frame:SetHeight(22)
|
||||||
local editbox = aux.gui.editbox(frame)
|
local editbox = aux.gui.editbox(frame)
|
||||||
editbox:SetAllPoints()
|
editbox:SetAllPoints()
|
||||||
editbox:SetJustifyH('RIGHT')
|
editbox:SetJustifyH('RIGHT')
|
||||||
editbox:SetFont(aux.gui.config.font, 17)
|
editbox:SetFont(aux.gui.config.font, 17)
|
||||||
editbox:SetScript('OnTextChanged', function()
|
editbox:SetScript('OnTextChanged', function()
|
||||||
this.pretty:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3))
|
this.pretty:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3))
|
||||||
m.refresh = true
|
m.refresh = true
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnTabPressed', function()
|
editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() and m.stack_count_slider.editbox:IsVisible() then
|
if IsShiftKeyDown() and m.stack_count_slider.editbox:IsVisible() then
|
||||||
m.stack_count_slider.editbox:SetFocus()
|
m.stack_count_slider.editbox:SetFocus()
|
||||||
elseif IsShiftKeyDown() then
|
elseif IsShiftKeyDown() then
|
||||||
m.stack_size_slider.editbox:SetFocus()
|
m.stack_size_slider.editbox:SetFocus()
|
||||||
else
|
else
|
||||||
m.unit_buyout_price:SetFocus()
|
m.unit_buyout_price:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnEditFocusGained', function()
|
editbox:SetScript('OnEditFocusGained', function()
|
||||||
this:HighlightText()
|
this:HighlightText()
|
||||||
this.pretty:Hide()
|
this.pretty:Hide()
|
||||||
this:SetAlpha(1)
|
this:SetAlpha(1)
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnEditFocusLost', function()
|
editbox:SetScript('OnEditFocusLost', function()
|
||||||
this:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3, nil, true))
|
this:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3, nil, true))
|
||||||
this.pretty:Show()
|
this.pretty:Show()
|
||||||
this:SetAlpha(0)
|
this:SetAlpha(0)
|
||||||
end)
|
end)
|
||||||
editbox:SetAlpha(0)
|
editbox:SetAlpha(0)
|
||||||
editbox.pretty = aux.gui.label(frame, 17)
|
editbox.pretty = aux.gui.label(frame, 17)
|
||||||
editbox.pretty:SetPoint('LEFT', 1, 0)
|
editbox.pretty:SetPoint('LEFT', 1, 0)
|
||||||
editbox.pretty:SetPoint('RIGHT', -2, 0)
|
editbox.pretty:SetPoint('RIGHT', -2, 0)
|
||||||
editbox.pretty:SetJustifyH('RIGHT')
|
editbox.pretty:SetJustifyH('RIGHT')
|
||||||
do
|
do
|
||||||
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
|
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Unit Starting Price')
|
label:SetText('Unit Starting Price')
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = aux.gui.label(frame, 14)
|
local label = aux.gui.label(frame, 14)
|
||||||
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
||||||
label:SetWidth(50)
|
label:SetWidth(50)
|
||||||
label:SetJustifyH('CENTER')
|
label:SetJustifyH('CENTER')
|
||||||
private.start_price_percentage = label
|
private.start_price_percentage = label
|
||||||
end
|
end
|
||||||
private.unit_start_price = editbox
|
private.unit_start_price = editbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local frame = CreateFrame('Frame', nil, m.frame.parameters)
|
local frame = CreateFrame('Frame', nil, m.frame.parameters)
|
||||||
private.buyout_price_frame = frame
|
private.buyout_price_frame = frame
|
||||||
aux.gui.set_content_style(frame)
|
aux.gui.set_content_style(frame)
|
||||||
frame:SetPoint('TOPRIGHT', m.unit_start_price, 'BOTTOMRIGHT', 0, -19)
|
frame:SetPoint('TOPRIGHT', m.unit_start_price, 'BOTTOMRIGHT', 0, -19)
|
||||||
frame:SetWidth(180)
|
frame:SetWidth(180)
|
||||||
frame:SetHeight(22)
|
frame:SetHeight(22)
|
||||||
local editbox = aux.gui.editbox(frame)
|
local editbox = aux.gui.editbox(frame)
|
||||||
editbox:SetAllPoints()
|
editbox:SetAllPoints()
|
||||||
editbox:SetJustifyH('RIGHT')
|
editbox:SetJustifyH('RIGHT')
|
||||||
editbox:SetFont(aux.gui.config.font, 17)
|
editbox:SetFont(aux.gui.config.font, 17)
|
||||||
editbox:SetScript('OnTextChanged', function()
|
editbox:SetScript('OnTextChanged', function()
|
||||||
this.pretty:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3))
|
this.pretty:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3))
|
||||||
m.refresh = true
|
m.refresh = true
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnTabPressed', function()
|
editbox:SetScript('OnTabPressed', function()
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
m.unit_start_price:SetFocus()
|
m.unit_start_price:SetFocus()
|
||||||
else
|
else
|
||||||
m.stack_size_slider.editbox:SetFocus()
|
m.stack_size_slider.editbox:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnEnterPressed', function()
|
editbox:SetScript('OnEnterPressed', function()
|
||||||
this:ClearFocus()
|
this:ClearFocus()
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnEditFocusGained', function()
|
editbox:SetScript('OnEditFocusGained', function()
|
||||||
this:HighlightText()
|
this:HighlightText()
|
||||||
this.pretty:Hide()
|
this.pretty:Hide()
|
||||||
this:SetAlpha(1)
|
this:SetAlpha(1)
|
||||||
end)
|
end)
|
||||||
editbox:SetScript('OnEditFocusLost', function()
|
editbox:SetScript('OnEditFocusLost', function()
|
||||||
this:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3, nil, true))
|
this:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3, nil, true))
|
||||||
this.pretty:Show()
|
this.pretty:Show()
|
||||||
this:SetAlpha(0)
|
this:SetAlpha(0)
|
||||||
end)
|
end)
|
||||||
editbox:SetAlpha(0)
|
editbox:SetAlpha(0)
|
||||||
editbox.pretty = aux.gui.label(frame, 17)
|
editbox.pretty = aux.gui.label(frame, 17)
|
||||||
editbox.pretty:SetPoint('LEFT', 1, 0)
|
editbox.pretty:SetPoint('LEFT', 1, 0)
|
||||||
editbox.pretty:SetPoint('RIGHT', -2, 0)
|
editbox.pretty:SetPoint('RIGHT', -2, 0)
|
||||||
editbox.pretty:SetJustifyH('RIGHT')
|
editbox.pretty:SetJustifyH('RIGHT')
|
||||||
do
|
do
|
||||||
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
|
local label = aux.gui.label(frame, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Unit Buyout Price')
|
label:SetText('Unit Buyout Price')
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = aux.gui.label(frame, 14)
|
local label = aux.gui.label(frame, 14)
|
||||||
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
||||||
label:SetWidth(50)
|
label:SetWidth(50)
|
||||||
label:SetJustifyH('CENTER')
|
label:SetJustifyH('CENTER')
|
||||||
private.buyout_price_percentage = label
|
private.buyout_price_percentage = label
|
||||||
end
|
end
|
||||||
private.unit_buyout_price = editbox
|
private.unit_buyout_price = editbox
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = aux.gui.button(m.frame.parameters, 14)
|
local btn = aux.gui.button(m.frame.parameters, 14)
|
||||||
btn:SetPoint('TOPRIGHT', -14, -146)
|
btn:SetPoint('TOPRIGHT', -14, -146)
|
||||||
btn:SetWidth(150)
|
btn:SetWidth(150)
|
||||||
btn:SetHeight(20)
|
btn:SetHeight(20)
|
||||||
btn:GetFontString():SetJustifyH('RIGHT')
|
btn:GetFontString():SetJustifyH('RIGHT')
|
||||||
btn:GetFontString():SetPoint('RIGHT', -2, 0)
|
btn:GetFontString():SetPoint('RIGHT', -2, 0)
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
if this.amount then
|
if this.amount then
|
||||||
m.set_unit_start_price(this.amount)
|
m.set_unit_start_price(this.amount)
|
||||||
m.set_unit_buyout_price(this.amount)
|
m.set_unit_buyout_price(this.amount)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
local label = aux.gui.label(btn, aux.gui.config.small_font_size)
|
local label = aux.gui.label(btn, aux.gui.config.small_font_size)
|
||||||
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Historical Value')
|
label:SetText('Historical Value')
|
||||||
private.historical_value_button = btn
|
private.historical_value_button = btn
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -133,6 +133,7 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
function m.LOAD()
|
function m.LOAD()
|
||||||
|
m.create_frames()
|
||||||
m.update_tab(m.SAVED)
|
m.update_tab(m.SAVED)
|
||||||
m.update_auto_buy_filter()
|
m.update_auto_buy_filter()
|
||||||
m.new_search('')
|
m.new_search('')
|
||||||
|
|||||||
+649
-647
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user