Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 23, 2018, 12:20:35 AM (6 years ago)
Author:
landauf
Message:

updated HostMenu.lua, MultiplayerMenu.lua, ShipSelectionMenu.lua, SingleplayerConfigMenu.lua to cegui 0.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUITools.lua

    r11797 r11799  
    3131
    3232    local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel())
    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()
     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()
    3535
    3636    table.insert(size, height)
     
    4040
    4141function getScrollingStepSize(window)
    42     local height = window:getUnclippedOuterRect():getHeight()
    43     local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclippedOuterRect():getHeight()
     42    local height = window:getUnclippedOuterRect():get():getHeight()
     43    local maxHeight = window:getRootWindow():getUnclippedOuterRect():get():getHeight()
    4444    local ratio = height/maxHeight
    4545    return 0.008*ratio/0.3204
Note: See TracChangeset for help on using the changeset viewer.