- Timestamp:
- Feb 23, 2018, 12:20:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUITools.lua
r11797 r11799 31 31 32 32 local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel()) 33 local height = window:getFont():getLineSpacing() + window:getUnclippedOuterRect():get Height() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight()34 local width = window:getFont():getTextExtent(window:getText()) + window:getUnclippedOuterRect():get Width() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth()33 local height = window:getFont():getLineSpacing() + window:getUnclippedOuterRect():get():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight() 34 local width = window:getFont():getTextExtent(window:getText()) + window:getUnclippedOuterRect():get():getWidth() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth() 35 35 36 36 table.insert(size, height) … … 40 40 41 41 function getScrollingStepSize(window) 42 local height = window:getUnclippedOuterRect():get Height()43 local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclippedOuterRect():getHeight()42 local height = window:getUnclippedOuterRect():get():getHeight() 43 local maxHeight = window:getRootWindow():getUnclippedOuterRect():get():getHeight() 44 44 local ratio = height/maxHeight 45 45 return 0.008*ratio/0.3204
Note: See TracChangeset
for help on using the changeset viewer.