From cccfcfdaa1a067eda2e745254ef3407c0348dcbb Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Sun, 22 Mar 2026 16:43:45 +0100 Subject: [PATCH 1/6] feat: add visual for checkbox the checkbox should set the starting price to the buyout price by default when postion items. functional implementation still needs to be done. --- tabs/post/frame.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tabs/post/frame.lua b/tabs/post/frame.lua index acbbcf27..abbe2a7a 100644 --- a/tabs/post/frame.lua +++ b/tabs/post/frame.lua @@ -264,7 +264,14 @@ function aux.handle.INIT_UI() hide_checkbox = checkbox end do - local editbox = gui.editbox(frame.parameters) + local checkbox = gui.checkbox(frame.parameters) + checkbox:SetPoint('RIGHT', hide_checkbox, 'LEFT', -135, 0) + local label = gui.label(checkbox, gui.font_size.small) + label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1) + label:SetText('Starting = Buyout') + start_equals_buyout_checkbox = checkbox + end + do local editbox = gui.editbox(frame.parameters) editbox:SetPoint('TOPRIGHT', -71, -60) editbox:SetWidth(180) editbox:SetHeight(22) From 5c69eacd7dc25f048734cef91c8d149e06659f7e Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Sun, 22 Mar 2026 16:45:14 +0100 Subject: [PATCH 2/6] refactor: deduplicate post_auctions method public method contained the same code. now the public method calls the private method. --- tabs/post/core.lua | 50 +--------------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/tabs/post/core.lua b/tabs/post/core.lua index 9f1980c7..d6e6d541 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -249,55 +249,7 @@ function post_auctions() end function M.post_auctions_bind() - if selected_item then - local unit_start_price = get_unit_start_price() - local unit_buyout_price = get_unit_buyout_price() - local stack_size = stack_size_slider:GetValue() - local stack_count - stack_count = stack_count_slider:GetValue() - local duration = UIDropDownMenu_GetSelectedValue(duration_dropdown) - local key = selected_item.key - - local duration_code - if duration == DURATION_2 then - duration_code = 2 - elseif duration == DURATION_8 then - duration_code = 3 - elseif duration == DURATION_24 then - duration_code = 4 - end - - post.start( - key, - stack_size, - duration, - unit_start_price, - unit_buyout_price, - stack_count, - function(posted) - if not frame:IsShown() then - return - end - for i = 1, posted do - record_auction(key, stack_size, unit_start_price * stack_size, unit_buyout_price, duration_code, UnitName'player') - end - update_inventory_records() - local same - for _, record in inventory_records do - if record.key == key then - same = record - break - end - end - if same then - update_item(same) - else - selected_item = nil - end - refresh = true - end - ) - end + post_auctions() end function validate_parameters() From a06977f6eb3fc43ebac4bc0b25eabe766f225241 Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Sun, 22 Mar 2026 16:53:02 +0100 Subject: [PATCH 3/6] feat: activate functionality of buyout = starting checkbox --- tabs/post/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabs/post/core.lua b/tabs/post/core.lua index d6e6d541..d848a38f 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -198,7 +198,7 @@ end function post_auctions() if selected_item then - local unit_start_price = get_unit_start_price() + local unit_start_price = start_equals_buyout_checkbox:GetChecked() and get_unit_buyout_price() or get_unit_start_price() local unit_buyout_price = get_unit_buyout_price() local stack_size = stack_size_slider:GetValue() local stack_count From 0d8ca703a5230e7c84a7dc9d90af5e70d4f5eb15 Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Sun, 22 Mar 2026 17:16:29 +0100 Subject: [PATCH 4/6] feat: hiding starting price input, if checkbox checked --- tabs/post/frame.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tabs/post/frame.lua b/tabs/post/frame.lua index abbe2a7a..002239cd 100644 --- a/tabs/post/frame.lua +++ b/tabs/post/frame.lua @@ -266,6 +266,15 @@ function aux.handle.INIT_UI() do local checkbox = gui.checkbox(frame.parameters) checkbox:SetPoint('RIGHT', hide_checkbox, 'LEFT', -135, 0) + checkbox:SetScript('OnClick', function() + if this:GetChecked() then + unit_start_price_input:Hide() + start_price_percentage:Hide() + else + unit_start_price_input:Show() + start_price_percentage:Show() + end + end) local label = gui.label(checkbox, gui.font_size.small) label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1) label:SetText('Starting = Buyout') From 0912cc088950ca4f2872bd1663d07e2ed2fa4259 Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Sun, 22 Mar 2026 17:40:12 +0100 Subject: [PATCH 5/6] fix: check visibility of starting price on item switch method to check general visibility of starting price input is established: update_start_price_visibility --- tabs/post/core.lua | 12 +++++++++++- tabs/post/frame.lua | 10 +--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tabs/post/core.lua b/tabs/post/core.lua index d848a38f..e67a09b1 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -65,6 +65,16 @@ function refresh_button_click() refresh = true end +function update_start_price_visibility() + if start_equals_buyout_checkbox:GetChecked() then + unit_start_price_input:Hide() + start_price_percentage:Hide() + else + unit_start_price_input:Show() + start_price_percentage:Show() + end +end + function tab.OPEN() frame:Show() update_inventory_records() @@ -290,7 +300,7 @@ function update_item_configuration() hide_checkbox:Hide() vendor_price_label:Hide() else - unit_start_price_input:Show() + update_start_price_visibility() unit_buyout_price_input:Show() stack_size_slider:Show() stack_count_slider:Show() diff --git a/tabs/post/frame.lua b/tabs/post/frame.lua index 002239cd..f976ea08 100644 --- a/tabs/post/frame.lua +++ b/tabs/post/frame.lua @@ -266,15 +266,7 @@ function aux.handle.INIT_UI() do local checkbox = gui.checkbox(frame.parameters) checkbox:SetPoint('RIGHT', hide_checkbox, 'LEFT', -135, 0) - checkbox:SetScript('OnClick', function() - if this:GetChecked() then - unit_start_price_input:Hide() - start_price_percentage:Hide() - else - unit_start_price_input:Show() - start_price_percentage:Show() - end - end) + checkbox:SetScript('OnClick', update_start_price_visibility) local label = gui.label(checkbox, gui.font_size.small) label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1) label:SetText('Starting = Buyout') From f6354d778fb307f64b47dc27c28458b9bf117cf4 Mon Sep 17 00:00:00 2001 From: KennyCrafty Date: Mon, 30 Mar 2026 16:24:45 +0200 Subject: [PATCH 6/6] feat: change validation of "post" button if the checkbox "Starting = Buying" is checked, the check for "Unit Starting Price" > "Unit Buying Price" is not done anymore. Why? the checkbox "Starting = Buying" deactivates the usage of "Unit Starting Price" --- tabs/post/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabs/post/core.lua b/tabs/post/core.lua index e67a09b1..f77493c7 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -267,7 +267,7 @@ function validate_parameters() post_button:Disable() return end - if get_unit_buyout_price() > 0 and get_unit_start_price() > get_unit_buyout_price() then + if not start_equals_buyout_checkbox:GetChecked() and get_unit_buyout_price() > 0 and get_unit_start_price() > get_unit_buyout_price() then post_button:Disable() return end