class "opt_con_cmd" (CUIWindow)

function opt_con_cmd:__init() super()
end

function opt_con_cmd:__finalize()
end

function opt_con_cmd:initOneEntry(cName, cType, xml)

	local _st		= xml:InitStatic			("con_cmd:templ_item",				self.scroll_v)
	local _st2		= xml:InitStatic			("con_cmd:caption",				_st)
	_st2:SetText	(cName)
	
	if(cType=="track") then
		xml:InitTrackBar						("con_cmd:track_"..cName,			_st)
	elseif(cType=="check") then
		local ch = xml:InitCheck				("con_cmd:check_"..cName,			_st)
		ch:SetWndPos(vector2():set(240,0))
		ch:SetWndSize(vector2():set(30,21))
	end
end

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

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

	self:initOneEntry							("g_god", "check", xml)
	self:initOneEntry							("g_unlimitedammo", "check", xml)
	self:initOneEntry							("hud_weapon", "check", xml)
	self:initOneEntry							("g_autopickup", "check", xml)

	self:initOneEntry							("wpn_aim_toggle", "check", xml)
	self:initOneEntry							("hud_old_style", "check", xml)
	self:initOneEntry							("hud_info", "check", xml)
	self:initOneEntry							("hud_crosshair_dist", "check", xml)
	self:initOneEntry							("hud_crosshair", "check", xml)
	self:initOneEntry							("hud_draw", "check", xml)
	self:initOneEntry							("g_always_run", "check", xml)

	self:initOneEntry							("dbg_destroy", "check", xml)
	self:initOneEntry							("dbg_draw_actor_alive", "check", xml)
	self:initOneEntry							("dbg_draw_actor_dead", "check", xml)
	self:initOneEntry							("dbg_draw_actor_phys", "check", xml)
	self:initOneEntry							("dbg_draw_autopickupbox", "check", xml)
	self:initOneEntry							("dbg_draw_bullet_hit", "check", xml)
	self:initOneEntry							("dbg_draw_climbable", "check", xml)
	self:initOneEntry							("dbg_draw_customzone", "check", xml)
	self:initOneEntry							("dbg_draw_invitem", "check", xml)
	self:initOneEntry							("dbg_draw_ph_cashed_tries_stats", "check", xml)
	self:initOneEntry							("dbg_draw_ph_contacts", "check", xml)
	self:initOneEntry							("dbg_draw_ph_death_boxes", "check", xml)
	self:initOneEntry							("dbg_draw_ph_enabled_aabbs", "check", xml)
	self:initOneEntry							("dbg_draw_ph_explosion_position", "check", xml)
	self:initOneEntry							("dbg_draw_ph_explosions", "check", xml)
	self:initOneEntry							("dbg_draw_ph_hit_anims", "check", xml)
	self:initOneEntry							("dbg_draw_ph_hit_app_pos", "check", xml)
	self:initOneEntry							("dbg_draw_ph_ik_goal", "check", xml)
	self:initOneEntry							("dbg_draw_ph_ik_limits", "check", xml)
	self:initOneEntry							("dbg_draw_ph_intersected_tries", "check", xml)
	self:initOneEntry							("dbg_draw_ph_mass_centres", "check", xml)
	self:initOneEntry							("dbg_draw_ph_negative_tries", "check", xml)
	self:initOneEntry							("dbg_draw_ph_positive_tries", "check", xml)
	self:initOneEntry							("dbg_draw_ph_ray_motions", "check", xml)
	self:initOneEntry							("dbg_draw_ph_saved_tries", "check", xml)
	self:initOneEntry							("dbg_draw_ph_statistics", "check", xml)
	self:initOneEntry							("dbg_draw_ph_tri_point", "check", xml)
	self:initOneEntry							("dbg_draw_ph_tri_test_aabb", "check", xml)
	self:initOneEntry							("dbg_draw_ph_tri_trace", "check", xml)
	self:initOneEntry							("dbg_draw_ph_tries_changes_sign", "check", xml)
	self:initOneEntry							("dbg_draw_ph_zbuffer_disable", "check", xml)
	self:initOneEntry							("dbg_draw_rp", "check", xml)
	self:initOneEntry							("dbg_draw_skeleton", "check", xml)
	self:initOneEntry							("dbg_draw_teamzone", "check", xml)
	self:initOneEntry							("dbg_dump_physics_step", "check", xml)
	self:initOneEntry							("dbg_ph_actor_restriction", "check", xml)
	self:initOneEntry							("dbg_ph_ai_always_phmove", "check", xml)
	self:initOneEntry							("dbg_ph_ai_never_phmove", "check", xml)
	self:initOneEntry							("dbg_ph_character_control", "check", xml)
	self:initOneEntry							("dbg_ph_ik", "check", xml)
	self:initOneEntry							("dbg_ph_ik_limits", "check", xml)
	self:initOneEntry							("dbg_ph_ik_off", "check", xml)
	self:initOneEntry							("dbg_ph_ladder", "check", xml)
	self:initOneEntry							("dbg_ph_obj_collision_damage", "check", xml)
	self:initOneEntry							("show_wnd_rect_all", "check", xml)

end
