Changeset 7163 for code/trunk/data/gui/scripts/GUITools.lua
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/data/gui/scripts/GUITools.lua
r6746 r7163 45 45 return 0.008*ratio/0.3204 46 46 end 47 48 function getStaticTextWindowHeight(window) 49 local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel()) 50 local formattedArea = lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window) 51 local frameHeight = window:getUnclippedPixelRect():getHeight() - formattedArea:getHeight() 52 local lines = window:getFont():getFormattedLineCount(window:getText(), formattedArea, CEGUI.WordWrapLeftAligned) 53 local height = lines * window:getFont():getLineSpacing() + frameHeight 54 return height 55 end
Note: See TracChangeset
for help on using the changeset viewer.