------------------------------------------------------------------------------
-- Imports
------------------------------------------------------------------------------

local make_class = require 'src.utils.classes'
local constants  = require 'src.gstates.menus.const'
local settings   = require 'src.utils.settings'
local BaseMenu   = require 'src.gstates.menus.base'
local Color      = require 'src.utils.color'
local HBox       = require 'src.ui.hbox'
local Label      = require 'src.ui.label'
local TextButton = require 'src.ui.textbtn'


------------------------------------------------------------------------------
-- Class definitions
------------------------------------------------------------------------------

local OptionsMenu = make_class(BaseMenu)


------------------------------------------------------------------------------
-- Class methods
------------------------------------------------------------------------------

function OptionsMenu:_init(parent, title_font, button_font)
    BaseMenu._init(self, parent, "Options Menu", constants.OPTIONS_MENU, 'imgs/cpu.png')

    -- Create UI elements of the main menu.
    self.container:add(Label(nil, nil, 'Options', title_font, Color(215, 0, 0), true))

    local box = HBox()
    box:add(Label(nil, nil, 'Enable Permadeath', button_font))
    box:add(Label(nil, nil, 'X', button_font))
    self.container:add(box)

    box = HBox()
    box:add(Label(nil, nil, 'Controls', button_font))
    self.container:add(box)

    box = HBox()
    box:add(Label(nil, nil, 'Sound Volume', button_font))
    self.container:add(box)

    box = HBox()
    box:add(Label(nil, nil, 'Music Volume', button_font))
    self.container:add(box)

    box = HBox()
    box:add(TextButton('Go Back', button_font, nil, nil, function() parent.next_menu = constants.MAIN_MENU end))
    self.container:add(box)
end


------------------------------------------------------------------------------
-- Module return
------------------------------------------------------------------------------

return OptionsMenu
