[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / dialogs / GUIDialogButtonMenu.cpp
blob04ed916e7549099300f5b6215c30eee7a8179490
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #include "GUIDialogButtonMenu.h"
11 #include "guilib/GUIMessage.h"
13 #define CONTROL_BUTTON_LABEL 3100
15 CGUIDialogButtonMenu::CGUIDialogButtonMenu(int id, const std::string &xmlFile)
16 : CGUIDialog(id, xmlFile.c_str())
18 m_loadType = KEEP_IN_MEMORY;
21 CGUIDialogButtonMenu::~CGUIDialogButtonMenu(void) = default;
23 bool CGUIDialogButtonMenu::OnMessage(CGUIMessage &message)
25 bool bRet = CGUIDialog::OnMessage(message);
26 if (message.GetMessage() == GUI_MSG_CLICKED)
28 // someone has been clicked - deinit...
29 Close();
30 return true;
32 return bRet;
35 void CGUIDialogButtonMenu::FrameMove()
37 // get the active control, and put it's label into the label control
38 const CGUIControl *pControl = GetFocusedControl();
39 if (pControl && (pControl->GetControlType() == CGUIControl::GUICONTROL_BUTTON ||
40 pControl->GetControlType() == CGUIControl::GUICONTROL_TOGGLEBUTTON ||
41 pControl->GetControlType() == CGUIControl::GUICONTROL_COLORBUTTON))
43 SET_CONTROL_LABEL(CONTROL_BUTTON_LABEL, pControl->GetDescription());
45 CGUIDialog::FrameMove();