class "opt_gameplay" (CUIWindow)

function opt_gameplay:__init() super()
end

function opt_gameplay:__finalize()

end

function opt_gameplay: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_gameplay:cap_difficulty", _st)
    xml:InitComboBox("tab_gameplay:list_difficulty", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_lang", _st)
    xml:InitComboBox("tab_gameplay:list_lang", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_bobbing_factor", _st)
    xml:InitTrackBar("tab_gameplay:track_bobbing_factor", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_hit_slowmo", _st)
    xml:InitCheck("tab_gameplay:check_hit_slowmo", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_wpn_aim_toggle", _st)
    xml:InitCheck("tab_gameplay:check_wpn_aim_toggle", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_crosshair", _st)
    xml:InitCheck("tab_gameplay:check_crosshair", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_dyn_crosshair", _st)
    xml:InitCheck("tab_gameplay:check_dyn_crosshair", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_show_weapon", _st)
    xml:InitCheck("tab_gameplay:check_show_weapon", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_dist", _st)
    xml:InitCheck("tab_gameplay:check_dist", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_tips", _st)
    xml:InitCheck("tab_gameplay:check_tips", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_crouch_toggle", _st)
    xml:InitCheck("tab_gameplay:check_crouch_toggle", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_important_save", _st)
    xml:InitCheck("tab_gameplay:check_important_save", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_check_hud_draw", _st)
    xml:InitCheck("tab_gameplay:check_hud_draw", _st)
    addControl(_st)

    _st = xml:InitStatic("video_adv:templ_item", nil)
    xml:InitStatic("tab_gameplay:cap_rs_fps_show", _st)
    xml:InitCheck("tab_gameplay:check_rs_fps_show", _st)
    addControl(_st)
end
