class "opt_sound" (CUIWindow)

function opt_sound:__init() super()
end

function opt_sound:__finalize()

end

function opt_sound:InitControls(x, y, xml, handler)

    self:SetWndPos(vector2():set(x,y))
    self:SetWndSize(vector2():set(738,416))
    self:SetAutoDelete(true)
    self.scroll_v = xml:InitScrollView("main_dialog:scroll_v", self)

    local _st
    local addControl = function(crl)	
        self.scroll_v:AddWindow(crl, true)
        crl:SetAutoDelete(false)
    end

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_sound:cap_mastervolume", _st)
    xml:InitTrackBar("tab_sound:track_mastervolume", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_sound:cap_musicvolume", _st)
    xml:InitTrackBar("tab_sound:track_musicvolume", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_sound:cap_snd_device", _st)
    xml:InitComboBox("tab_sound:list_snd_device", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitCheck("tab_sound:check_dynamic_music", _st)
    xml:InitStatic("tab_sound:cap_check_dynamic_music", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_sound:cap_check_eax", _st)
    xml:InitCheck("tab_sound:check_eax", _st)
    addControl(_st)


end
