Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7801 for code/trunk/data


Ignore:
Timestamp:
Dec 22, 2010, 7:24:24 PM (13 years ago)
Author:
dafrick
Message:

Merging presentation2 branch back to trunk.

Location:
code/trunk
Files:
2 deleted
11 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/layouts/AudioMenu.layout

    r6746 r7801  
    113113                <Property Name="Text" >Theme changes might take
    114114up to a minute.</Property>
    115                 <Property Name="TextColours" Value="FF4444FF" />
     115                <Property Name="TextColours" Value="FFFFFFFF" />
    116116                <Property Name="InheritsAlpha" Value="False" />
    117117                <Property Name="HorzFormatting" Value="HorzCentred" />
  • code/trunk/data/gui/layouts/CreditsMenu.layout

    r7732 r7801  
    3232                    <Property Name="VertScrollPosition" Value="0" />
    3333                    <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsText" >
    34                         <Property Name="TextColours" Value="FF4444FF" />
     34                        <Property Name="TextColours" Value="FFFFFFFF" />
    3535                        <Property Name="InheritsAlpha" Value="False" />
    3636                        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3838                        <Property Name="VertFormatting" Value="TopAligned" />
    3939                        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    40                         <Property Name="Text">Orxonox version 0.0.3
     40                        <Property Name="Text">wird sowieso nicht gelesen
     41Orxonox version 0.0.3
    4142
    4243Programming Language:  C++ - lua - tcl
     
    4546
    4647http://www.orxonox.net
    47 n
    48 n
    49 n
    50 n
    51 n
    52 n
    53 n
    54 n
    55 n                       </Property>
     48                      </Property>
    5649                    </Window>
    5750                </Window>
  • code/trunk/data/gui/layouts/GraphicsMenu.layout

    r6746 r7801  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    17             <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
     17            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="MenuWidgets/StaticText" Name="orxonox/Resolution" >
    1919                <Property Name="Text" Value="Resolution" />
     
    2222                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2323                <Property Name="VertFormatting" Value="TopAligned" />
    24                 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.475,0},{0.92,0}}" />
     24                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.10,0},{0.475,0},{0.65,0}}" />
    2525                <Window Type="MenuWidgets/Listbox" Name="orxonox/ResolutionListbox" >
    2626                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    27                     <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.95,0}}" />
     27                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.95,0}}" />
    2828                    <Event Name="ItemSelectionChanged" Function="GraphicsMenu.GraphicsResolutionListbox_changed"/>
     29                </Window>
     30            </Window>
     31            <Window Type="MenuWidgets/StaticText" Name="orxonox/Themes" >
     32                <Property Name="Text" Value="Themes" />
     33                <Property Name="InheritsAlpha" Value="False" />
     34                <Property Name="HorzFormatting" Value="HorzCentred" />
     35                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     36                <Property Name="VertFormatting" Value="TopAligned" />
     37                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.10,0},{0.95,0},{0.35,0}}" />
     38                <Window Type="MenuWidgets/Listbox" Name="orxonox/ThemeDropBox" >
     39                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     40                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.3,0},{0.95,0},{0.95,0}" />
     41                    <Event Name="ItemSelectionChanged" Function="GraphicsMenu.ThemeDropBox_changed"/>
    2942                </Window>
    3043            </Window>
     
    3548                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    3649                <Property Name="VertFormatting" Value="TopAligned" />
    37                 <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.15,0},{0.95,0},{0.35,0}}" />
     50                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.70,0},{0.475,0},{0.85,0}}" />
    3851                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/BrightnessScrollbar" >
    3952                    <Property Name="Disabled" Value="true" />
     
    5366                <Property Name="Text" Value="Fullscreen" />
    5467                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    55                 <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.4,0},{0.85,0},{0.475,0}}" />
     68                <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.35,0},{0.85,0},{0.425,0}}" />
    5669                <Event Name="CheckStateChanged" Function="GraphicsMenu.GraphicsFullscreenCheckbox_clicked"/>
    5770            </Window>
     
    6174settings require
    6275a game restart.</Property>
    63                 <Property Name="TextColours" Value="FF4444FF" />
     76                <Property Name="TextColours" Value="FFFFFFFF" />
    6477                <Property Name="InheritsAlpha" Value="False" />
    6578                <Property Name="HorzFormatting" Value="HorzCentred" />
    6679                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    6780                <Property Name="VertFormatting" Value="TopAligned" />
    68                 <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.525,0},{0.95,0},{0.92,0}}" />
     81                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.425,0},{0.95,0},{0.85,0}}" />
    6982            </Window>
    7083        </Window>
  • code/trunk/data/gui/layouts/InGameMenu.layout

    r6746 r7801  
    1010            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1111            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
    12             <Property Name="Alpha" Value="0.7" />
     12            <Property Name="Alpha" Value="0.9" />
    1313            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
    1414        </Window>
     
    1717            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1818            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4625,0},{0.6,0},{0.5125,0}}" />
    19             <Property Name="Alpha" Value="0.7" />
     19            <Property Name="Alpha" Value="0.9" />
    2020            <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
    2121        </Window>
     
    2424            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2525            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5625,0},{0.6,0},{0.6125,0}}" />
    26             <Property Name="Alpha" Value="0.7" />
     26            <Property Name="Alpha" Value="0.9" />
    2727            <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/>
    2828        </Window>
     
    3131            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    3232            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    33             <Property Name="Alpha" Value="0.7" />
     33            <Property Name="Alpha" Value="0.9" />
    3434            <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/>
    3535        </Window>
  • code/trunk/data/gui/layouts/MultiplayerMenu.layout

    r7732 r7801  
    3232                <Event Name="SelectStateChanged" Function="MultiplayerMenu.InternetButton_clicked"/>
    3333            </Window>
    34 
    35 
    3634        </Window>
    3735         <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerBackButton" >
  • code/trunk/data/gui/scripts/ChatBox-inputonly.lua

    r7163 r7801  
    11-- ChatBox-inputonly.lua
    22
    3 local P = createMenuSheet("ChatBox-inputonly")
     3local P = createMenuSheet("ChatBox-inputonly", true, TriBool.True, TriBool.Dontcare, false)
    44return P
    55
  • code/trunk/data/gui/scripts/ChatBox.lua

    r7612 r7801  
    11-- ChatBox.lua
    22
    3 local P = createMenuSheet("ChatBox")
     3local P = createMenuSheet("ChatBox", true, TriBool.True, TriBool.Dontcare, false)
    44
    55function P.ChatBoxCloseButton_clicked(e)
  • code/trunk/data/gui/scripts/GraphicsMenu.lua

    r7689 r7801  
    44
    55P.buttonList = {}
     6P.schemeList = {"TaharezGreen", "Orxonox"}
    67
    78function P.onShow()
     
    9798    }
    9899    P.buttonList[1] = item
     100
     101    local dropbox = winMgr:getWindow("orxonox/ThemeDropBox")
     102    local scheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_")
     103    for k,v in pairs(P.schemeList) do
     104        local item = CEGUI.createListboxTextItem(P.schemeList[k])
     105        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     106        CEGUI.toListbox(dropbox):addItem(item)
     107        if v == scheme then
     108            dropbox:setItemSelectState(item, true)
     109        end
     110    end
     111
     112end
     113
     114function P.ThemeDropBox_changed(e)
     115    local dropbox = winMgr:getWindow("orxonox/ThemeDropBox")
     116    local listbox = CEGUI.toListbox(dropbox)
     117    local choice = listbox:getFirstSelectedItem()
     118    local index = 0
     119    if choice ~= nil then
     120        index = listbox:getItemIndex(choice)
     121    end
     122    orxonox.CommandExecutor:execute("config GUIManager guiScheme_ " .. P.schemeList[index+1])
    99123end
    100124
  • code/trunk/data/gui/scripts/InitialiseGUI.lua

    r7734 r7801  
    55winMgr    = CEGUI.WindowManager:getSingleton()
    66
     7local scheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_")
    78-- Load all required skins
    8 schemeMgr:loadScheme("TaharezGreenLook.scheme")
    9 --schemeMgr:loadScheme("OrxonoxLook.scheme")
     9--schemeMgr:loadScheme("TaharezGreenLook.scheme")
     10schemeMgr:loadScheme(scheme .. "Look.scheme")
    1011--schemeMgr:loadScheme("TaharezLook.scheme")
    1112--schemeMgr:loadScheme("WindowsLook.scheme")
     
    1617-- By loading a different file (if there is) you can change the skin
    1718-- of the menus or the HUD independently
    18 schemeMgr:loadScheme("TaharezGreenMenuWidgets.scheme")
    19 menuImageSet = "TaharezGreenLook"
    20 schemeMgr:loadScheme("TaharezGreenHUDWidgets.scheme")
    21 hudImageSet = "TaharezGreenLook"
    22 --schemeMgr:loadScheme("OrxonoxLookMenuWidgets.scheme")
    23 --menuImageSet = "OrxonoxLook"
    24 --schemeMgr:loadScheme("OrxonoxLookHUDWidgets.scheme")
    25 --hudImageSet = "OrxonoxLook"
     19--schemeMgr:loadScheme("TaharezGreenMenuWidgets.scheme")
     20--menuImageSet = "TaharezGreenLook"
     21--schemeMgr:loadScheme("TaharezGreenHUDWidgets.scheme")
     22--hudImageSet = "TaharezGreenLook"
     23schemeMgr:loadScheme(scheme .. "MenuWidgets.scheme")
     24menuImageSet = scheme .. "Look"
     25schemeMgr:loadScheme(scheme .. "HUDWidgets.scheme")
     26hudImageSet = scheme .. "Look"
    2627
    2728-- Just a remaining test hack
  • code/trunk/data/gui/scripts/MultiplayerMenu.lua

    r7732 r7801  
    66
    77--joinMode is 1 for choice "LAN" and 2 for "Internet"
    8 --initial status 0
    9 P.joinMode = 0
     8--initial status 1
     9P.joinMode = 1
    1010
    1111function P.onLoad()
     
    3333
    3434function P.onShow()
    35     P.showServerList()
     35    --P.showServerList()
    3636
    3737    --indices to iterate through buttonlist
    3838    P.oldindex = -2
    3939    P.index = -1
     40   
     41    if P.joinMode == 1 then
     42        local window = winMgr:getWindow("orxonox/MultiplayerLanButton")
     43        local button = tolua.cast(window,"CEGUI::RadioButton")
     44        button:setSelected(true)
     45    end
     46    if P.joinMode == 2 then
     47        local window = winMgr:getWindow("orxonox/MultiplayerInternetButton")
     48        local button = tolua.cast(window,"CEGUI::RadioButton")
     49        button:setSelected(true)
     50    end
    4051end
    4152
    4253function P.LanButton_clicked(e)
     54    local we = CEGUI.toWindowEventArgs(e)
     55    local button = tolua.cast(we.window,"CEGUI::RadioButton")
    4356    P.joinMode = 1
     57    if button:isSelected() == true then
     58            P.showServerList()
     59    end
    4460end
    4561
    4662function P.InternetButton_clicked(e)
     63    local we = CEGUI.toWindowEventArgs(e)
     64    local button = tolua.cast(we.window,"CEGUI::RadioButton")
    4765    P.joinMode = 2
     66    if button:isSelected() == true then
     67            P.showServerList()
     68        end
    4869end
    4970
     
    5576function P.MultiplayerJoinButton_clicked(e)
    5677    local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()   
    57 
    58     if P.joinMode == 2 then
    59         if choice then
    60             local client = orxonox.Client:getInstance()
    61             local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
    62             client:setDestination( P.serverList[index][2], 55556 )
    63         else
    64             return
    65         end
    66         orxonox.execute("startClient")
    67         hideAllMenuSheets()
     78    if choice then
     79        local client = orxonox.Client:getInstance()
     80        local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
     81        client:setDestination( P.serverList[index][2], 55556 )
    6882    else
    69         --wait for Sandro's function
     83        return
    7084    end
    71 
     85    orxonox.execute("startClient")
     86    hideAllMenuSheets()
    7287end
    7388
     
    7792
    7893function P.showServerList()
    79     local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
    80     CEGUI.toListbox(listbox):resetList()
    81     local discovery = orxonox.LANDiscovery:getInstance()
    82     discovery:discover()
    83     P.serverList = {}
    84     local index = 0
    85     local servername = ""
    86     local serverip = ""
    87     while true do
    88         servername = discovery:getServerListItemName(index)
    89         if servername == "" then
    90             break
    91         end
    92         serverip = discovery:getServerListItemIP(index)
    93         if serverip == "" then
    94           break
    95         end
    96         table.insert(P.serverList, {servername, serverip})
    97         index = index + 1
    98     end
    99     index = 1
    100     for k,v in pairs(P.serverList) do
    101         local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
    102         item:setID(index)
    103         index = index + 1
    104         item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    105         CEGUI.toListbox(listbox):addItem(item)
    106     end
     94        -- LAN Discovery
     95        if P.joinMode == 1 then
     96                local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     97                CEGUI.toListbox(listbox):resetList()
     98                local discovery = orxonox.LANDiscovery:getInstance()
     99                discovery:discover()
     100                P.serverList = {}
     101                local index = 0
     102                local servername = ""
     103                local serverip = ""
     104                while true do
     105                    servername = discovery:getServerListItemName(index)
     106                    if servername == "" then
     107                        break
     108                    end
     109                    serverip = discovery:getServerListItemIP(index)
     110                    if serverip == "" then
     111                      break
     112                    end
     113                    table.insert(P.serverList, {servername, serverip})
     114                    index = index + 1
     115                end
     116                index = 1
     117                for k,v in pairs(P.serverList) do
     118                    local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
     119                    item:setID(index)
     120                    index = index + 1
     121                    item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     122                    CEGUI.toListbox(listbox):addItem(item)
     123                end
     124        -- WAN Discovery
     125        elseif P.joinMode == 2 then
     126                local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     127                CEGUI.toListbox(listbox):resetList()
     128                local discovery = orxonox.WANDiscovery:getInstance()
     129                cout(0, "discovering.\n" )
     130                discovery:discover()
     131                cout(0, "discovered.\n" )
     132                P.serverList = {}
     133                local index = 0
     134                local servername = ""
     135                local serverip = ""
     136                while true do
     137                    servername = discovery:getServerListItemName(index)
     138                    if servername == "" then
     139                        break
     140                    end
     141                    serverip = discovery:getServerListItemIP(index)
     142                    if serverip == "" then
     143                      break
     144                    end
     145                    table.insert(P.serverList, {servername, serverip})
     146                    index = index + 1
     147                end
     148                index = 1
     149                for k,v in pairs(P.serverList) do
     150                    local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
     151                    item:setID(index)
     152                    index = index + 1
     153                    item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     154                    CEGUI.toListbox(listbox):addItem(item)
     155                end
     156        end
     157       
    107158end
    108159
Note: See TracChangeset for help on using the changeset viewer.