From 852a72581fcbf35c14682c739c09990acc2e831b Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 19 Sep 2016 09:19:26 +0200 Subject: [PATCH] reverted some editbox changes as it seems coloring while typing cannot be done properly in vanilla --- gui/core.lua | 1 + tabs/post/frame.lua | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/core.lua b/gui/core.lua index 22419bb..c6829ef 100644 --- a/gui/core.lua +++ b/gui/core.lua @@ -300,6 +300,7 @@ function public.editbox(parent) editbox:SetTextInsets(1.5, 1.5, 3, 3) editbox:SetMaxLetters(nil) editbox:SetHeight(24) + editbox:SetTextColor(0, 0, 0, 0) set_content_style(editbox) editbox:SetScript('OnEscapePressed', function() this:ClearFocus() diff --git a/tabs/post/frame.lua b/tabs/post/frame.lua index 797104f..6e26e4c 100644 --- a/tabs/post/frame.lua +++ b/tabs/post/frame.lua @@ -215,7 +215,6 @@ function create_frames() unit_buyout_price:SetFocus() end end) - editbox.colorizer = function(text) return gsub(text, '[gsc]', function(str) return str == 'g' and money.GOLD_TEXT or str == 's' and money.SILVER_TEXT or str == 'c' and money.COPPER_TEXT end) end editbox.formatter = function() return money.to_string(get_unit_start_price(), true, nil, 3) end editbox.change = function() refresh = true end editbox.enter = function() this:ClearFocus() end @@ -251,7 +250,6 @@ function create_frames() stack_size_slider.editbox:SetFocus() end end) - editbox.colorizer = function(text) return gsub(text, '[gsc]', function(str) return str == 'g' and money.GOLD_TEXT or str == 's' and money.SILVER_TEXT or str == 'c' and money.COPPER_TEXT end) end editbox.formatter = function() return money.to_string(get_unit_buyout_price(), true, nil, 3) end editbox.change = function() refresh = true end editbox.enter = function() this:ClearFocus() end