Changeset 7961 for code/branches/kicklib/data/gui/scripts/GUITools.lua
- Timestamp:
- Feb 25, 2011, 5:02:13 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/data/gui/scripts/GUITools.lua
r7922 r7961 31 31 32 32 local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel()) 33 local height = window:getFont():getLineSpacing() + window:getUnclipped PixelRect():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight()34 local width = window:getFont():getTextExtent(window:getText()) + window:getUnclipped PixelRect():getWidth() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth()33 local height = window:getFont():getLineSpacing() + window:getUnclippedOuterRect():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight() 34 local width = window:getFont():getTextExtent(window:getText()) + window:getUnclippedOuterRect():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:getUnclipped PixelRect():getHeight()43 local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclipped PixelRect():getHeight()42 local height = window:getUnclippedOuterRect():getHeight() 43 local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclippedOuterRect():getHeight() 44 44 local ratio = height/maxHeight 45 45 return 0.008*ratio/0.3204 … … 49 49 local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel()) 50 50 local formattedArea = lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window) 51 local frameHeight = window:getUnclipped PixelRect():getHeight() - formattedArea:getHeight()51 local frameHeight = window:getUnclippedOuterRect():getHeight() - formattedArea:getHeight() 52 52 local lines = window:getFont():getFormattedLineCount(window:getText(), formattedArea, CEGUI.WordWrapLeftAligned) 53 53 local height = lines * window:getFont():getLineSpacing() + frameHeight
Note: See TracChangeset
for help on using the changeset viewer.