forked from mirrors/0ad
Add getTextSize() for CButton
Summary:9c5062147aintroduced the `getTextSize()` to all GUIObjects for getting the rendered size of a text.8190293f8bmade it only available to CText. `getTextSize()` can also be useful for CButtons so this diff adds the function back to CButtons. There seem to be no other GUIObjects besiders CText and CButton where `getTextSize()` makes sense. Reviewed By: wraitii Differential Revision: https://code.wildfiregames.com/D3195 This was SVN commit r24378.
This commit is contained in:
@@ -40,6 +40,7 @@ void CGUI::AddObjectTypes()
|
||||
m_ProxyData.insert(JSI_GUIProxy<IGUIObject>::CreateData(*m_ScriptInterface));
|
||||
m_ProxyData.insert(JSI_GUIProxy<CText>::CreateData(*m_ScriptInterface));
|
||||
m_ProxyData.insert(JSI_GUIProxy<CList>::CreateData(*m_ScriptInterface));
|
||||
m_ProxyData.insert(JSI_GUIProxy<CButton>::CreateData(*m_ScriptInterface));
|
||||
|
||||
AddObjectType("button", &CButton::ConstructObject);
|
||||
AddObjectType("chart", &CChart::ConstructObject);
|
||||
|
||||
Reference in New Issue
Block a user