From 30030a61d3fe98ecc76b395d47bba92714cb986c Mon Sep 17 00:00:00 2001 From: Byrth Date: Wed, 5 Jul 2023 22:40:31 -0400 Subject: [PATCH] make it possible to access text settings again --- addons/libs/texts.lua | 4 ++++ addons/pointwatch/pointwatch.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/libs/texts.lua b/addons/libs/texts.lua index d040b6380..32cf2e9d7 100644 --- a/addons/libs/texts.lua +++ b/addons/libs/texts.lua @@ -607,6 +607,10 @@ function texts.destroy(t) meta[t] = nil end +function texts.settings(t) + return meta[t].settings +end + -- Handle drag and drop windower.register_event('mouse', function(type, x, y, delta, blocked) if blocked then diff --git a/addons/pointwatch/pointwatch.lua b/addons/pointwatch/pointwatch.lua index 4fc0ac0dd..aa67a7a4a 100644 --- a/addons/pointwatch/pointwatch.lua +++ b/addons/pointwatch/pointwatch.lua @@ -203,7 +203,7 @@ windower.register_event('addon command',function(...) end end texts[first_cmd](box,unpack(tab)) - settings.text_box_settings = box._settings + settings.text_box_settings = box.settings() config.save(settings) elseif first_cmd == 'reload' then windower.send_command('lua r pointwatch')