1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

Add: Add a function to check if a window has a certain widget.

This commit is contained in:
Juanjo
2014-08-23 18:22:18 +02:00
committed by J0anJosep
parent ece7f8401f
commit d5306c9e55

View File

@@ -336,6 +336,11 @@ public:
template <class NWID>
inline NWID *GetWidget(WidgetID widnum);
inline bool HasWidget(WidgetID widnum) const
{
return this->GetWidget<NWidgetCore>(widnum) != nullptr;
}
const Scrollbar *GetScrollbar(WidgetID widnum) const;
Scrollbar *GetScrollbar(WidgetID widnum);