2 * Copyright (C) 2005-2012 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 #include "GUIDialogBusy.h"
22 #include "guilib/GUIWindowManager.h"
24 CGUIDialogBusy::CGUIDialogBusy(void)
25 : CGUIDialog(WINDOW_DIALOG_BUSY, "DialogBusy.xml"), m_bLastVisible(false)
27 m_loadType = LOAD_ON_GUI_INIT;
31 CGUIDialogBusy::~CGUIDialogBusy(void)
35 void CGUIDialogBusy::Show_Internal()
40 m_bLastVisible = true;
42 g_windowManager.RouteToWindow(this);
44 // active this window...
45 CGUIMessage msg(GUI_MSG_WINDOW_INIT, 0, 0);
49 void CGUIDialogBusy::DoProcess(unsigned int currentTime, CDirtyRegionList &dirtyregions)
51 bool visible = g_windowManager.GetTopMostModalDialogID() == WINDOW_DIALOG_BUSY;
52 if(!visible && m_bLastVisible)
53 dirtyregions.push_back(m_renderRegion);
54 m_bLastVisible = visible;
55 CGUIDialog::DoProcess(currentTime, dirtyregions);
58 void CGUIDialogBusy::Render()
65 bool CGUIDialogBusy::OnBack(int actionID)