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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user