[Gameplay] Reduce loom cost
[0ad.git] / source / gui / GUIObjectTypes.cpp
blob95ca1925a457a0c3844b486c3380cbb1887f7b77
1 /* Copyright (C) 2020 Wildfire Games.
2 * This file is part of 0 A.D.
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
18 #include "precompiled.h"
20 #include "gui/ObjectTypes/CButton.h"
21 #include "gui/ObjectTypes/CChart.h"
22 #include "gui/ObjectTypes/CCheckBox.h"
23 #include "gui/ObjectTypes/CDropDown.h"
24 #include "gui/ObjectTypes/CGUIDummyObject.h"
25 #include "gui/ObjectTypes/CHotkeyPicker.h"
26 #include "gui/ObjectTypes/CImage.h"
27 #include "gui/ObjectTypes/CInput.h"
28 #include "gui/ObjectTypes/CList.h"
29 #include "gui/ObjectTypes/CMiniMap.h"
30 #include "gui/ObjectTypes/COList.h"
31 #include "gui/ObjectTypes/CProgressBar.h"
32 #include "gui/ObjectTypes/CRadioButton.h"
33 #include "gui/ObjectTypes/CSlider.h"
34 #include "gui/ObjectTypes/CText.h"
35 #include "gui/ObjectTypes/CTooltip.h"
36 #include "gui/Scripting/JSInterface_GUIProxy.h"
38 void CGUI::AddObjectTypes()
40 m_ProxyData.insert(JSI_GUIProxy<IGUIObject>::CreateData(*m_ScriptInterface));
41 m_ProxyData.insert(JSI_GUIProxy<CText>::CreateData(*m_ScriptInterface));
42 m_ProxyData.insert(JSI_GUIProxy<CList>::CreateData(*m_ScriptInterface));
43 m_ProxyData.insert(JSI_GUIProxy<CMiniMap>::CreateData(*m_ScriptInterface));
44 m_ProxyData.insert(JSI_GUIProxy<CButton>::CreateData(*m_ScriptInterface));
46 AddObjectType("button", &CButton::ConstructObject);
47 AddObjectType("chart", &CChart::ConstructObject);
48 AddObjectType("checkbox", &CCheckBox::ConstructObject);
49 AddObjectType("dropdown", &CDropDown::ConstructObject);
50 AddObjectType("empty", &CGUIDummyObject::ConstructObject);
51 AddObjectType("hotkeypicker", &CHotkeyPicker::ConstructObject);
52 AddObjectType("image", &CImage::ConstructObject);
53 AddObjectType("input", &CInput::ConstructObject);
54 AddObjectType("list", &CList::ConstructObject);
55 AddObjectType("minimap", &CMiniMap::ConstructObject);
56 AddObjectType("olist", &COList::ConstructObject);
57 AddObjectType("progressbar", &CProgressBar::ConstructObject);
58 AddObjectType("radiobutton", &CRadioButton::ConstructObject);
59 AddObjectType("slider", &CSlider::ConstructObject);
60 AddObjectType("text", &CText::ConstructObject);
61 AddObjectType("tooltip", &CTooltip::ConstructObject);