summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-24 05:32:21 +0200
committerAki <nthirtyone@gmail.com>2016-08-24 05:32:21 +0200
commitbf9ad0478e6b72f0e19af9cb7e65337521721e77 (patch)
treed1f19da6fe468551c93eddfc43a3ef6f02545d8d
parent2aef35b0bbb72595977cddc2c2bbb3f65beb6bc6 (diff)
downloadroflnauts-bf9ad0478e6b72f0e19af9cb7e65337521721e77.zip
roflnauts-bf9ad0478e6b72f0e19af9cb7e65337521721e77.tar.gz
roflnauts-bf9ad0478e6b72f0e19af9cb7e65337521721e77.tar.bz2
reset active element
-rw-r--r--menu.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/menu.lua b/menu.lua
index 95e764b..206c45e 100644
--- a/menu.lua
+++ b/menu.lua
@@ -26,6 +26,7 @@ function Menu:delete() end
function Menu:load(name)
local name = "config/" .. (name or "menumain") .. ".lua"
local menu = love.filesystem.load(name)
+ self.active = 1
self.elements = menu(self)
self.elements[self.active]:focus()
end