about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-01-30 10:20:37 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-01-30 10:20:37 -0800
commit266de35f87161f841c26ab18a044cdf0a02682ad (patch)
treeb4d385ed7f823a983477212f7c16ec22cb4002ae
parent18f44c97617b6c4a96e10077a805d3fcdf70fba1 (diff)
downloadview.love-266de35f87161f841c26ab18a044cdf0a02682ad.tar.gz
create a place for graphical log handlers
Currently only used in pong.love, but let's keep the bad merge that had
it broken since September from occurring again. To do that we'll be
consistent across forks on where globals are initialized.

I haven't appreciated the implications of main.lua for load order.
log.lua comes first just because it's shared by both the main app and
its 'source' editing environment. And it just so happens that source.lua
was loading after log.lua resulting in the pong.love breakage. Now let's
lean into that and enshrine that one should initialize log_render in
log.lua.
-rw-r--r--log.lua3
-rw-r--r--source.lua1
2 files changed, 3 insertions, 1 deletions
diff --git a/log.lua b/log.lua
index f59449c..6bbd0c4 100644
--- a/log.lua
+++ b/log.lua
@@ -31,4 +31,7 @@ function log_new(name, stack_frame_index)
 	log_start(name, stack_frame_index)
 end
 
+-- rendering graphical objects within sections/boxes
+log_render = {}
+
 -- vim:noexpandtab
diff --git a/source.lua b/source.lua
index b3357ba..eeaea21 100644
--- a/source.lua
+++ b/source.lua
@@ -1,5 +1,4 @@
 source = {}
-log_render = {}
 
 Editor_state = {}