money input changes
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ do
|
|||||||
function declarator_mt:__newindex(key, value) self=state[self]
|
function declarator_mt:__newindex(key, value) self=state[self]
|
||||||
local name, event = self.declaration_name, nil
|
local name, event = self.declaration_name, nil
|
||||||
if name then
|
if name then
|
||||||
event = EVENT[key] or declaration_error()
|
event = EVENT[key] or error(name)
|
||||||
else
|
else
|
||||||
name, event = key, type(value) == 'function' and CALL or INDEX
|
name, event = key, type(value) == 'function' and CALL or INDEX
|
||||||
end
|
end
|
||||||
|
|||||||
+10
-8
@@ -226,6 +226,7 @@ function create_frames()
|
|||||||
unit_buyout_price:SetFocus()
|
unit_buyout_price:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
editbox.colorizer = function(text) return gsub(text, '[gsc]', function(str) return str == 'g' and aux.money.GOLD_TEXT or str == 's' and aux.money.SILVER_TEXT or str == 'c' and aux.money.COPPER_TEXT end) end
|
||||||
editbox.formatter = function() return money.to_string(get_unit_start_price(), true, nil, 3) end
|
editbox.formatter = function() return money.to_string(get_unit_start_price(), true, nil, 3) end
|
||||||
editbox.change = function() refresh = true end
|
editbox.change = function() refresh = true end
|
||||||
editbox.enter = function() this:ClearFocus() end
|
editbox.enter = function() this:ClearFocus() end
|
||||||
@@ -233,13 +234,13 @@ function create_frames()
|
|||||||
this:SetText(money.to_string(get_unit_start_price(), true, nil, 3, nil, true))
|
this:SetText(money.to_string(get_unit_start_price(), true, nil, 3, nil, true))
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, gui.font_size.small)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Unit Starting Price')
|
label:SetText('Unit Starting Price')
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, 14)
|
local label = gui.label(editbox, 14)
|
||||||
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
label:SetPoint('LEFT', editbox, 'RIGHT', 8, 0)
|
||||||
label:SetWidth(50)
|
label:SetWidth(50)
|
||||||
label:SetJustifyH('CENTER')
|
label:SetJustifyH('CENTER')
|
||||||
start_price_percentage = label
|
start_price_percentage = label
|
||||||
@@ -260,6 +261,7 @@ function create_frames()
|
|||||||
stack_size_slider.editbox:SetFocus()
|
stack_size_slider.editbox:SetFocus()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
editbox.colorizer = function(text) return gsub(text, '[gsc]', function(str) return str == 'g' and aux.money.GOLD_TEXT or str == 's' and aux.money.SILVER_TEXT or str == 'c' and aux.money.COPPER_TEXT end) end
|
||||||
editbox.formatter = function() return money.to_string(get_unit_buyout_price(), true, nil, 3) end
|
editbox.formatter = function() return money.to_string(get_unit_buyout_price(), true, nil, 3) end
|
||||||
editbox.change = function() refresh = true end
|
editbox.change = function() refresh = true end
|
||||||
editbox.enter = function() this:ClearFocus() end
|
editbox.enter = function() this:ClearFocus() end
|
||||||
@@ -267,13 +269,13 @@ function create_frames()
|
|||||||
this:SetText(money.to_string(get_unit_buyout_price(), true, nil, 3, nil, true))
|
this:SetText(money.to_string(get_unit_buyout_price(), true, nil, 3, nil, true))
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, gui.font_size.small)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Unit Buyout Price')
|
label:SetText('Unit Buyout Price')
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, 14)
|
local label = gui.label(editbox, 14)
|
||||||
label:SetPoint('LEFT', frame, 'RIGHT', 8, 0)
|
label:SetPoint('LEFT', editbox, 'RIGHT', 8, 0)
|
||||||
label:SetWidth(50)
|
label:SetWidth(50)
|
||||||
label:SetJustifyH('CENTER')
|
label:SetJustifyH('CENTER')
|
||||||
buyout_price_percentage = label
|
buyout_price_percentage = label
|
||||||
|
|||||||
+4
-1
@@ -1,9 +1,12 @@
|
|||||||
aux 'money'
|
aux 'money'
|
||||||
|
|
||||||
|
public()
|
||||||
GOLD_TEXT = '|cffffd70ag|r'
|
GOLD_TEXT = '|cffffd70ag|r'
|
||||||
SILVER_TEXT = '|cffc7c7cfs|r'
|
SILVER_TEXT = '|cffc7c7cfs|r'
|
||||||
COPPER_TEXT = '|cffeda55fc|r'
|
COPPER_TEXT = '|cffeda55fc|r'
|
||||||
|
private()
|
||||||
|
--a = nil
|
||||||
|
----log(a)
|
||||||
COPPER_PER_SILVER = 100
|
COPPER_PER_SILVER = 100
|
||||||
COPPER_PER_GOLD = 10000
|
COPPER_PER_GOLD = 10000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user