From dd32c9c620918a3b0da59e42ff343cdd78a12a39 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 22 Aug 2016 17:22:49 +0200 Subject: added music --- assets/music/ROFLmenu.ogg | Bin 1041812 -> 0 bytes assets/music/menu.ogg | Bin 0 -> 1041812 bytes menu.lua | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 assets/music/ROFLmenu.ogg create mode 100644 assets/music/menu.ogg diff --git a/assets/music/ROFLmenu.ogg b/assets/music/ROFLmenu.ogg deleted file mode 100644 index 07bcb89..0000000 Binary files a/assets/music/ROFLmenu.ogg and /dev/null differ diff --git a/assets/music/menu.ogg b/assets/music/menu.ogg new file mode 100644 index 0000000..07bcb89 Binary files /dev/null and b/assets/music/menu.ogg differ diff --git a/menu.lua b/menu.lua index 9c7481b..49c067d 100644 --- a/menu.lua +++ b/menu.lua @@ -3,12 +3,14 @@ -- I do know that model I used here and in `World` loading configuration files is not flawless but I did not want to rewrite `World`s one but wanted to keep things similar at least in project scope. require "selector" +require "music" -- Here it begins Menu = { scale = getScale(), elements, --table - active = 1 + active = 1, + music } function Menu:new(name) local o = {} @@ -16,6 +18,7 @@ function Menu:new(name) self.__index = self o.elements = {} o:load(name) + o.music = Music:new("menu.ogg") return o end function Menu:delete() end -- cgit v1.1