mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 05:26:47 +00:00
Fix warnings on the charts tab of summary screen
Engine.GetTextWidth has been deprecated since e845da025a
Idea:
If you look at a dropdown as just a text field (its header) that can
change caption like any other, then getPreferredHeaderTextSize is the
equivalent to getPreferredTextSize (present on buttons and text fields).
Fixes #8493
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "gui/ObjectBases/IGUIObject.h"
|
||||
#include "gui/ObjectTypes/CButton.h"
|
||||
#include "gui/ObjectTypes/CDropDown.h"
|
||||
#include "gui/ObjectTypes/CList.h"
|
||||
#include "gui/ObjectTypes/CMiniMap.h"
|
||||
#include "gui/ObjectTypes/CScrollPanel.h"
|
||||
@@ -69,6 +70,13 @@ template<> void JSI_GUIProxy<CList>::CreateFunctions(const ScriptRequest& rq, GU
|
||||
}
|
||||
DECLARE_GUIPROXY(CList);
|
||||
|
||||
// CDropDown
|
||||
template<> void JSI_GUIProxy<CDropDown>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache)
|
||||
{
|
||||
CreateFunction<&CDropDown::GetPreferredHeaderTextSize>(rq, cache, "getPreferredHeaderTextSize");
|
||||
}
|
||||
DECLARE_GUIPROXY(CDropDown);
|
||||
|
||||
// CMiniMap
|
||||
template<> void JSI_GUIProxy<CMiniMap>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user