Changeset 7732 for code/trunk/data/gui/scripts
- Timestamp:
- Dec 8, 2010, 3:29:28 PM (14 years ago)
- Location:
- code/trunk/data/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/data/gui/scripts/CreditsMenu.lua
r7689 r7732 4 4 5 5 P.buttonList = {} 6 P.scrollbarWidth = 13 6 7 7 8 function P.onLoad() … … 17 18 P.oldindex = -2 18 19 P.index = -1 20 21 local description = winMgr:getWindow("orxonox/CreditsText") 22 description:setProperty("HorzFormatting", "WordWrapLeftAligned") 23 description:setProperty("VertFormatting", "TopAligned") 24 description:setText(" Orxonox version 0.0.3 \n\n Programming Language: C++ - lua - tcl \n Environment: OpenAL - Ogre - OIS - CEGUI - enet - ODE \n Licence: GNU General Public Licence - Creative Commons \n http://www.orxonox.net \n \n Credits:") 25 26 description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0))) 27 height = getStaticTextWindowHeight(description) 28 description:setHeight(CEGUI.UDim(0, height)) 19 29 end 20 30 -
code/trunk/data/gui/scripts/MultiplayerMenu.lua
r7690 r7732 4 4 5 5 P.buttonList = {} 6 7 --joinMode is 1 for choice "LAN" and 2 for "Internet" 8 --initial status 0 9 P.joinMode = 0 6 10 7 11 function P.onLoad() … … 26 30 } 27 31 P.buttonList[4] = item 28 29 32 end 30 33 … … 37 40 end 38 41 42 function P.LanButton_clicked(e) 43 P.joinMode = 1 44 end 45 46 function P.InternetButton_clicked(e) 47 P.joinMode = 2 48 end 49 39 50 function P.MultiplayerHostButton_clicked(e) 40 51 showMenuSheet("HostMenu", true) … … 43 54 44 55 function P.MultiplayerJoinButton_clicked(e) 45 local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem() 46 if choice then 47 local client = orxonox.Client:getInstance() 48 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 49 client:setDestination( P.serverList[index][2], 55556 ) 56 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() 50 68 else 51 return69 --wait for Sandro's function 52 70 end 53 orxonox.execute("startClient") 54 hideAllMenuSheets() 71 55 72 end 56 73 -
code/trunk/data/gui/scripts/QuestGUI.lua
r7456 r7732 21 21 22 22 P.player = orxonox.GUIManager:getInstance():getPlayer(P.name) 23 P.rootWindow = P.createQuestGUI() ;23 P.rootWindow = P.createQuestGUI() 24 24 25 25 questsList:addChildWindow(P.rootWindow) … … 74 74 end 75 75 76 return index ;76 return index 77 77 end 78 78 … … 140 140 offset = offset + height 141 141 142 local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title") ;142 local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title") 143 143 window:addChildWindow(descriptionTitle) 144 144 descriptionTitle:setProperty("HorzFormatting", "HorzCentred") … … 151 151 offset = offset + height 152 152 153 local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description") ;153 local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description") 154 154 window:addChildWindow(description) 155 155 description:setProperty("HorzFormatting", "WordWrapLeftAligned") … … 165 165 local numHints = orxonox.QuestManager:getInstance():getNumHints(quest, P.player) 166 166 if numHints > 0 then 167 local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title") ;167 local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title") 168 168 window:addChildWindow(hintsTitle) 169 169 hintsTitle:setProperty("HorzFormatting", "HorzCentred") … … 247 247 local offset = 0 248 248 249 local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title") ;249 local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title") 250 250 window:addChildWindow(descriptionTitle) 251 251 descriptionTitle:setProperty("HorzFormatting", "HorzCentred") … … 258 258 offset = offset + height 259 259 260 local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description") ;260 local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description") 261 261 window:addChildWindow(description) 262 262 description:setProperty("HorzFormatting", "WordWrapLeftAligned")
Note: See TracChangeset
for help on using the changeset viewer.