Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11718 for code/trunk/data/gui


Ignore:
Timestamp:
Jan 7, 2018, 10:34:30 PM (7 years ago)
Author:
landauf
Message:

tabs → spaces

Location:
code/trunk/data/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/layouts/Dialogue.layout

    r11451 r11718  
    33<GUILayout >
    44    <Window Type="DefaultWindow" Name="orxonox/Dialogue/Background" >
    5         <Property Name="InheritsAlpha" Value="False" />
     5        <Property Name="InheritsAlpha" Value="False" />
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/SingleplayerMenu.layout

    r10258 r11718  
    3333                <Property Name="HorzScrollbar" Value="False" />
    3434                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
    35                 <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
     35                <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
    3636            </Window>
    3737        </Window>
  • code/trunk/data/gui/scripts/HighscoreMenu.lua

    r11356 r11718  
    1212
    1313function P.onLoad()
    14         P.createLevelList()   
     14    P.createLevelList()   
    1515end
    1616
    1717function P.onShow()
    18        
    19         -- reset tables
    20         P.highscoreList = {}
    21         P.tabList = {}
    22         P.linesList = {}
     18   
     19    -- reset tables
     20    P.highscoreList = {}
     21    P.tabList = {}
     22    P.linesList = {}
    2323
    24         -- fetch save scores and write it into the list
    25         for i=orxonox.Highscore:getInstance():getNumberOfHighscores()-1,0,-1 do
    26                 table.insert(P.highscoreList, orxonox.Highscore:getInstance():getHighscore(i))
    27        
    28         end
    29        
    30         -- read minigames out of the levelList
     24    -- fetch save scores and write it into the list
     25    for i=orxonox.Highscore:getInstance():getNumberOfHighscores()-1,0,-1 do
     26        table.insert(P.highscoreList, orxonox.Highscore:getInstance():getHighscore(i))
     27   
     28    end
     29   
     30    -- read minigames out of the levelList
    3131    for k,v in pairs(P.levelList) do
    3232        if(v:getName() ~= "Hover level" and v:getName() ~= "Pong") then   -- hover and pong dont contain relevant scores
     
    3838function P.onHide()
    3939
    40         -- delete old windows to reload them on show
    41         local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
    42         for k,v in pairs(P.tabList) do
    43                 local default = winMgr:getWindow(v)
     40    -- delete old windows to reload them on show
     41    local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
     42    for k,v in pairs(P.tabList) do
     43            local default = winMgr:getWindow(v)
    4444            tabControl:removeChildWindow(default)
    45                 winMgr:destroyWindow(default)
     45            winMgr:destroyWindow(default)
    4646    end
    4747end
     
    6868    table.insert(P.tabList, tabName)
    6969    -- create new tab window with desired name
    70         local default = (winMgr:createWindow("DefaultWindow", tabName))
     70    local default = (winMgr:createWindow("DefaultWindow", tabName))
    7171    default:setText(name)
    7272    default:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
     
    7979    local offset = 2
    8080    for k,v in pairs(P.highscoreList) do
    81         -- split the score ("Playername./.game./.score")
    82         local splitlist = P.Split(v,"./.")
    83         if(splitlist[2] == name)then 
    84                 local line = P.createPickupEntry(tabName .. k,k,tag)
    85                 table.insert(P.linesList, line)
    86                 line:setYPosition(CEGUI.UDim(0,offset))
    87                 offset = offset + line:getHeight():asAbsolute(1)+2
    88                 pane:addChildWindow(line)       
    89         end
     81        -- split the score ("Playername./.game./.score")
     82        local splitlist = P.Split(v,"./.")
     83        if(splitlist[2] == name)then 
     84            local line = P.createPickupEntry(tabName .. k,k,tag)
     85            table.insert(P.linesList, line)
     86            line:setYPosition(CEGUI.UDim(0,offset))
     87            offset = offset + line:getHeight():asAbsolute(1)+2
     88            pane:addChildWindow(line)
     89        end
    9090       
    9191    end
    9292
    93         local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
    94         tabControl:addChildWindow(default)
     93    local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
     94    tabControl:addChildWindow(default)
    9595 
    9696
     
    111111   
    112112    item:addChildWindow(player)
    113        
     113       
    114114    local score = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Score")
    115115    score:setText(splitlist[3])
Note: See TracChangeset for help on using the changeset viewer.