Changeset 7801 for code/trunk/data/gui
- Timestamp:
- Dec 22, 2010, 7:24:24 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 deleted
- 11 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/data/gui/layouts/AudioMenu.layout
r6746 r7801 113 113 <Property Name="Text" >Theme changes might take 114 114 up to a minute.</Property> 115 <Property Name="TextColours" Value="FF 4444FF" />115 <Property Name="TextColours" Value="FFFFFFFF" /> 116 116 <Property Name="InheritsAlpha" Value="False" /> 117 117 <Property Name="HorzFormatting" Value="HorzCentred" /> -
code/trunk/data/gui/layouts/CreditsMenu.layout
r7732 r7801 32 32 <Property Name="VertScrollPosition" Value="0" /> 33 33 <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsText" > 34 <Property Name="TextColours" Value="FF 4444FF" />34 <Property Name="TextColours" Value="FFFFFFFF" /> 35 35 <Property Name="InheritsAlpha" Value="False" /> 36 36 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> … … 38 38 <Property Name="VertFormatting" Value="TopAligned" /> 39 39 <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 41 Orxonox version 0.0.3 41 42 42 43 Programming Language: C++ - lua - tcl … … 45 46 46 47 http://www.orxonox.net 47 n 48 n 49 n 50 n 51 n 52 n 53 n 54 n 55 n </Property> 48 </Property> 56 49 </Window> 57 50 </Window> -
code/trunk/data/gui/layouts/GraphicsMenu.layout
r6746 r7801 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2 875,0},{0.75,0},{0.6375,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="MenuWidgets/StaticText" Name="orxonox/Resolution" > 19 19 <Property Name="Text" Value="Resolution" /> … … 22 22 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 23 23 <Property Name="VertFormatting" Value="TopAligned" /> 24 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1 5,0},{0.475,0},{0.92,0}}" />24 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.10,0},{0.475,0},{0.65,0}}" /> 25 25 <Window Type="MenuWidgets/Listbox" Name="orxonox/ResolutionListbox" > 26 26 <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}}" /> 28 28 <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"/> 29 42 </Window> 30 43 </Window> … … 35 48 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 36 49 <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}}" /> 38 51 <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/BrightnessScrollbar" > 39 52 <Property Name="Disabled" Value="true" /> … … 53 66 <Property Name="Text" Value="Fullscreen" /> 54 67 <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}}" /> 56 69 <Event Name="CheckStateChanged" Function="GraphicsMenu.GraphicsFullscreenCheckbox_clicked"/> 57 70 </Window> … … 61 74 settings require 62 75 a game restart.</Property> 63 <Property Name="TextColours" Value="FF 4444FF" />76 <Property Name="TextColours" Value="FFFFFFFF" /> 64 77 <Property Name="InheritsAlpha" Value="False" /> 65 78 <Property Name="HorzFormatting" Value="HorzCentred" /> 66 79 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 67 80 <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}}" /> 69 82 </Window> 70 83 </Window> -
code/trunk/data/gui/layouts/InGameMenu.layout
r6746 r7801 10 10 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 11 11 <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" /> 13 13 <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/> 14 14 </Window> … … 17 17 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 18 <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" /> 20 20 <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/> 21 21 </Window> … … 24 24 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 25 25 <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" /> 27 27 <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/> 28 28 </Window> … … 31 31 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 32 32 <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" /> 34 34 <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/> 35 35 </Window> -
code/trunk/data/gui/layouts/MultiplayerMenu.layout
r7732 r7801 32 32 <Event Name="SelectStateChanged" Function="MultiplayerMenu.InternetButton_clicked"/> 33 33 </Window> 34 35 36 34 </Window> 37 35 <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerBackButton" > -
code/trunk/data/gui/scripts/ChatBox-inputonly.lua
r7163 r7801 1 1 -- ChatBox-inputonly.lua 2 2 3 local P = createMenuSheet("ChatBox-inputonly" )3 local P = createMenuSheet("ChatBox-inputonly", true, TriBool.True, TriBool.Dontcare, false) 4 4 return P 5 5 -
code/trunk/data/gui/scripts/ChatBox.lua
r7612 r7801 1 1 -- ChatBox.lua 2 2 3 local P = createMenuSheet("ChatBox" )3 local P = createMenuSheet("ChatBox", true, TriBool.True, TriBool.Dontcare, false) 4 4 5 5 function P.ChatBoxCloseButton_clicked(e) -
code/trunk/data/gui/scripts/GraphicsMenu.lua
r7689 r7801 4 4 5 5 P.buttonList = {} 6 P.schemeList = {"TaharezGreen", "Orxonox"} 6 7 7 8 function P.onShow() … … 97 98 } 98 99 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 112 end 113 114 function 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]) 99 123 end 100 124 -
code/trunk/data/gui/scripts/InitialiseGUI.lua
r7734 r7801 5 5 winMgr = CEGUI.WindowManager:getSingleton() 6 6 7 local scheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_") 7 8 -- Load all required skins 8 schemeMgr:loadScheme("TaharezGreenLook.scheme")9 --schemeMgr:loadScheme("OrxonoxLook.scheme")9 --schemeMgr:loadScheme("TaharezGreenLook.scheme") 10 schemeMgr:loadScheme(scheme .. "Look.scheme") 10 11 --schemeMgr:loadScheme("TaharezLook.scheme") 11 12 --schemeMgr:loadScheme("WindowsLook.scheme") … … 16 17 -- By loading a different file (if there is) you can change the skin 17 18 -- 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" 23 schemeMgr:loadScheme(scheme .. "MenuWidgets.scheme") 24 menuImageSet = scheme .. "Look" 25 schemeMgr:loadScheme(scheme .. "HUDWidgets.scheme") 26 hudImageSet = scheme .. "Look" 26 27 27 28 -- Just a remaining test hack -
code/trunk/data/gui/scripts/MultiplayerMenu.lua
r7732 r7801 6 6 7 7 --joinMode is 1 for choice "LAN" and 2 for "Internet" 8 --initial status 09 P.joinMode = 08 --initial status 1 9 P.joinMode = 1 10 10 11 11 function P.onLoad() … … 33 33 34 34 function P.onShow() 35 P.showServerList()35 --P.showServerList() 36 36 37 37 --indices to iterate through buttonlist 38 38 P.oldindex = -2 39 39 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 40 51 end 41 52 42 53 function P.LanButton_clicked(e) 54 local we = CEGUI.toWindowEventArgs(e) 55 local button = tolua.cast(we.window,"CEGUI::RadioButton") 43 56 P.joinMode = 1 57 if button:isSelected() == true then 58 P.showServerList() 59 end 44 60 end 45 61 46 62 function P.InternetButton_clicked(e) 63 local we = CEGUI.toWindowEventArgs(e) 64 local button = tolua.cast(we.window,"CEGUI::RadioButton") 47 65 P.joinMode = 2 66 if button:isSelected() == true then 67 P.showServerList() 68 end 48 69 end 49 70 … … 55 76 function P.MultiplayerJoinButton_clicked(e) 56 77 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 ) 68 82 else 69 --wait for Sandro's function83 return 70 84 end 71 85 orxonox.execute("startClient") 86 hideAllMenuSheets() 72 87 end 73 88 … … 77 92 78 93 function 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 107 158 end 108 159
Note: See TracChangeset
for help on using the changeset viewer.