about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-01-16 09:48:06 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-01-16 09:48:06 -0800
commit0719fdeaaf73cb0b1c9f2a8456e74613ae617ffe (patch)
treeb9e0d0f4770bb88e04f6b7967c3b6ff34dbabc90
parent22bf3da7de9074c6b99d8e43e3ab1772aed7b059 (diff)
downloadlines.love-0719fdeaaf73cb0b1c9f2a8456e74613ae617ffe.tar.gz
hoist out some common settings
-rw-r--r--main.lua5
-rw-r--r--run.lua5
-rw-r--r--source.lua5
3 files changed, 5 insertions, 10 deletions
diff --git a/main.lua b/main.lua
index 8e61b5f..31b7f5b 100644
--- a/main.lua
+++ b/main.lua
@@ -87,6 +87,11 @@ function App.initialize_globals()
 end
 
 function App.initialize(arg)
+  love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
+  love.keyboard.setKeyRepeat(true)
+
+  love.graphics.setBackgroundColor(1,1,1)
+
   if Current_app == 'run' then
     run.initialize(arg)
   elseif Current_app == 'source' then
diff --git a/run.lua b/run.lua
index 45df7c9..ec6a509 100644
--- a/run.lua
+++ b/run.lua
@@ -16,11 +16,6 @@ end
 -- called only for real run
 function run.initialize(arg)
   log_new('run')
-  love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
-  love.keyboard.setKeyRepeat(true)
-
-  love.graphics.setBackgroundColor(1,1,1)
-
   if Settings then
     run.load_settings()
   else
diff --git a/source.lua b/source.lua
index 44cf440..b3357ba 100644
--- a/source.lua
+++ b/source.lua
@@ -61,11 +61,6 @@ end
 -- called only for real run
 function source.initialize()
   log_new('source')
-  love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
-  love.keyboard.setKeyRepeat(true)
-
-  love.graphics.setBackgroundColor(1,1,1)
-
   if Settings and Settings.source then
     source.load_settings()
   else