
function ModelViewerConfigFrame_OnLoad()
	--ModelViewerConfigFrame:Show();
end

function ModelViewerConfigFrame_OnShow()
    ModelViewerConfigFrame_BackgroundCheckButtonText:SetText(" Show Background.");
    ModelViewerConfigFrame_BackgroundCheckButton:SetChecked(showBackgroundChecked);

    ModelViewerConfigFrame_OpenInspectCheckButtonText:SetText(" Open Inspect Window.");
  	ModelViewerConfigFrame_OpenInspectCheckButton:SetChecked(openInspectChecked);
end

----------------------------------
-- Option: Show Background
----------------------------------
function ModelViewerConfigFrame_BackgroundCheckButton_OnClick()
    if ModelViewerConfigFrame_BackgroundCheckButton:GetChecked() then
        showBackgroundChecked = true;
        ModelViewerMainFrame_ShowBackground();
    else
        showBackgroundChecked = false;
        ModelViewerMainFrame_HideBackground();
    end
    ModelViewerMainFrame_SaveVariables();
end

----------------------------------
-- Option: Opne Inspect Window
----------------------------------
function ModelViewerConfigFrame_OpenInspectCheckButton_OnClick()
    if ModelViewerConfigFrame_OpenInspectCheckButton:GetChecked() then
        openInspectChecked = true;
        BlizzardInspectUI_Show();
    else
        openInspectChecked = false;
        BlizzardInspectUI_Hide();
    end
    ModelViewerMainFrame_SaveVariables();
end

----------------------
-- Save Config Value
----------------------
function ModelViewerConfigFrame_OnHide()
	--ModelViewerConfigFrame_SaveVariables();
end

----------
-- Close
----------
function ModelViewerConfigFrame_CloseButton_OnClick()
	HideUIPanel(ModelViewerConfigFrame);
end
