[Orxonox-commit 2945] r7645 - in code/branches/releasetodo: data/levels src/libraries/core src/orxonox
dafrick at orxonox.net
dafrick at orxonox.net
Sat Nov 13 21:10:57 CET 2010
Author: dafrick
Date: 2010-11-13 21:10:57 +0100 (Sat, 13 Nov 2010)
New Revision: 7645
Modified:
code/branches/releasetodo/data/levels/Fight in our Back.oxw
code/branches/releasetodo/data/levels/Quest_PirateAttack.oxw
code/branches/releasetodo/data/levels/The Time Machine.oxw
code/branches/releasetodo/data/levels/empty_level.oxw
code/branches/releasetodo/data/levels/fps_test.oxw
code/branches/releasetodo/data/levels/notifications.oxw
code/branches/releasetodo/data/levels/pickups.oxw
code/branches/releasetodo/data/levels/presentation_FS10.oxw
code/branches/releasetodo/data/levels/presentation_FS10_ed.oxw
code/branches/releasetodo/data/levels/princessaeryn.oxw
code/branches/releasetodo/data/levels/screenshot.oxw
code/branches/releasetodo/data/levels/sound.oxw
code/branches/releasetodo/data/levels/teamdeathmatch.oxw
code/branches/releasetodo/data/levels/test_stars.oxw
code/branches/releasetodo/data/levels/test_swallow.oxw
code/branches/releasetodo/data/levels/waypoints.oxw
code/branches/releasetodo/src/libraries/core/GUIManager.cc
code/branches/releasetodo/src/orxonox/LevelInfo.cc
code/branches/releasetodo/src/orxonox/LevelInfo.h
Log:
Small adjustments.
Modified: code/branches/releasetodo/data/levels/Fight in our Back.oxw
===================================================================
--- code/branches/releasetodo/data/levels/Fight in our Back.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/Fight in our Back.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Fight in our Back"
description = "Our fleet is far ahead of us. We need to get rid of all the enemies in its back, because we do not want our enemies to attack from everywhere. So let us clear this Sector!"
- tags = "deathmatch, quests"
+ tags = ""
/>
<?lua
Modified: code/branches/releasetodo/data/levels/Quest_PirateAttack.oxw
===================================================================
--- code/branches/releasetodo/data/levels/Quest_PirateAttack.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/Quest_PirateAttack.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Pirate Attack"
description = "Dani's Testlevel"
- tags = "test, quests"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/The Time Machine.oxw
===================================================================
--- code/branches/releasetodo/data/levels/The Time Machine.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/The Time Machine.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "The Time Machine"
description = "A simple level. The only goal is to defeat as much enemies as you can."
- tags = "deathmatch"
+ tags = ""
/>
<?lua
Modified: code/branches/releasetodo/data/levels/empty_level.oxw
===================================================================
--- code/branches/releasetodo/data/levels/empty_level.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/empty_level.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Empty level"
description = "A level with absolutely nothing in it."
- tags = "empty"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/fps_test.oxw
===================================================================
--- code/branches/releasetodo/data/levels/fps_test.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/fps_test.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "FPS testlevel"
description = "Level to test First Person Shooter"
- tags = "test, FPS"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/notifications.oxw
===================================================================
--- code/branches/releasetodo/data/levels/notifications.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/notifications.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Notifications showcase"
description = "Level to test and showcase notifications."
- tags = "test, showcase, notifications"
+ tags = "test, showcase"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/pickups.oxw
===================================================================
--- code/branches/releasetodo/data/levels/pickups.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/pickups.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Pickups showcase"
description = "Level to test and showcase pickups."
- tags = "test, showcase, pickups"
+ tags = "test, showcase"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/presentation_FS10.oxw
===================================================================
--- code/branches/releasetodo/data/levels/presentation_FS10.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/presentation_FS10.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Presentation XI FPS"
description = "2nd Presentation level for Orxonox Convention XI, FPS"
- tags = "presentation, fps"
+ tags = "presentation"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/presentation_FS10_ed.oxw
===================================================================
--- code/branches/releasetodo/data/levels/presentation_FS10_ed.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/presentation_FS10_ed.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Presentation XI FPS"
description = "3rd Presentation level for Orxonox Convention XI, FPS"
- tags = "presentation, fps"
+ tags = "presentation"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/princessaeryn.oxw
===================================================================
--- code/branches/releasetodo/data/levels/princessaeryn.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/princessaeryn.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "The Tale of Princess Aeryn"
description = "The Tale of the elusive but beautiful Princess Aeryn"
- tags = "quests"
+ tags = ""
/>
<?lua
Modified: code/branches/releasetodo/data/levels/screenshot.oxw
===================================================================
--- code/branches/releasetodo/data/levels/screenshot.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/screenshot.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Screenshot"
description = "Level to make awesome screenshots in."
- tags = "test, screenshot"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/sound.oxw
===================================================================
--- code/branches/releasetodo/data/levels/sound.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/sound.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Sound showcase"
description = "Level to test and showcase sound."
- tags = "test, sound"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/teamdeathmatch.oxw
===================================================================
--- code/branches/releasetodo/data/levels/teamdeathmatch.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/teamdeathmatch.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Team Deathmatch"
description = "Fight against each other in teams."
- tags = "deathmatch"
+ tags = ""
/>
<?lua
Modified: code/branches/releasetodo/data/levels/test_stars.oxw
===================================================================
--- code/branches/releasetodo/data/levels/test_stars.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/test_stars.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Stars Testlevel"
description = "Level to test stars"
- tags = "test, stars"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/test_swallow.oxw
===================================================================
--- code/branches/releasetodo/data/levels/test_swallow.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/test_swallow.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Swallow Testlevel"
description = "Level to test the swallow spaceship."
- tags = "test, swallow"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/data/levels/waypoints.oxw
===================================================================
--- code/branches/releasetodo/data/levels/waypoints.oxw 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/data/levels/waypoints.oxw 2010-11-13 20:10:57 UTC (rev 7645)
@@ -1,7 +1,7 @@
<LevelInfo
name = "Waypoints Testlevel"
description = "Testing waypoings for AI controlled spaceships."
- tags = "test, waypoints"
+ tags = "test"
/>
<?lua
Modified: code/branches/releasetodo/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/releasetodo/src/libraries/core/GUIManager.cc 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/src/libraries/core/GUIManager.cc 2010-11-13 20:10:57 UTC (rev 7645)
@@ -437,20 +437,46 @@
}
}
+ /**
+ @brief
+ Subscribe the input function to the input event for the input window.
+ This is a helper to be used in lua, because subscribeScriptedEvent() doesn't work in lua.
+ @param window
+ The window for which the event is subscribed.
+ @param event
+ The type of event to which we subscribe.
+ @param function
+ The function that is called when the event occurs.
+ */
void GUIManager::subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function)
{
window->subscribeScriptedEvent(event, function);
}
+ /**
+ @brief
+ Set the input tooltip text for the input ListboxItem.
+ @param item
+ The ListboxItem for which the tooltip should be set.
+ @param tooltip
+ The tooltip text that should be set.
+ */
void GUIManager::setTooltipTextHelper(CEGUI::ListboxItem* item, const std::string& tooltip)
{
item->setTooltipText(tooltip);
}
+ /**
+ @brief
+ Set whether the tooltips for the input Listbox are enabled.
+ @param listbox
+ The Listbox for which to enable (or disable) tooltips.
+ @param enabled
+ Whether to enable or disabel the tooltips.
+ */
void GUIManager::setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled)
{
listbox->setItemTooltipsEnabled(enabled);
}
-
}
Modified: code/branches/releasetodo/src/orxonox/LevelInfo.cc
===================================================================
--- code/branches/releasetodo/src/orxonox/LevelInfo.cc 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/src/orxonox/LevelInfo.cc 2010-11-13 20:10:57 UTC (rev 7645)
@@ -76,8 +76,12 @@
{
}
-
- void LevelInfoItem::initializeTags(void)
+
+ /**
+ @brief
+ Initialize the set of allowed tags.
+ */
+ /*static*/ void LevelInfoItem::initializeTags(void)
{
if(!LevelInfoItem::initialized_s)
{
@@ -86,6 +90,7 @@
LevelInfoItem::possibleTags_s.insert("multiplayer");
LevelInfoItem::possibleTags_s.insert("showcase");
LevelInfoItem::possibleTags_s.insert("tutorial");
+ LevelInfoItem::possibleTags_s.insert("presentation");
}
}
Modified: code/branches/releasetodo/src/orxonox/LevelInfo.h
===================================================================
--- code/branches/releasetodo/src/orxonox/LevelInfo.h 2010-11-12 16:19:53 UTC (rev 7644)
+++ code/branches/releasetodo/src/orxonox/LevelInfo.h 2010-11-13 20:10:57 UTC (rev 7645)
@@ -37,7 +37,6 @@
#include "OrxonoxPrereqs.h"
-#include <map>
#include <set>
#include <string>
@@ -120,13 +119,19 @@
private:
void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
-
- static std::set<std::string> possibleTags_s;
- static const bool initialized_s = false;
- void initializeTags(void);
- bool validateTag(const std::string& tag)
- { this->initializeTags(); return LevelInfoItem::possibleTags_s.find(tag) != LevelInfoItem::possibleTags_s.end(); }
+ static void initializeTags(void); //!< Initialize the set of allowed tags.
+ /**
+ @brief Check whether an input tag is allowed.
+ @param tag The tag to check.
+ @return Returns true if the input tag is allowed, false if not.
+ */
+ static bool validateTag(const std::string& tag)
+ { LevelInfoItem::initializeTags(); return LevelInfoItem::possibleTags_s.find(tag) != LevelInfoItem::possibleTags_s.end(); }
+
+ static std::set<std::string> possibleTags_s; //!< The set of allowed tags.
+ static const bool initialized_s = false; //!< Whether the set of allowed tags has been inizialized.
+
std::string name_; //!< The name of the Level.
std::string description_; //!< The description of the Level.
std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
@@ -139,7 +144,7 @@
The following parameters can be specified:
- @b name The name of the level.
- @b description The description of the level.
- - @b tags A comma-seperated string of tags.
+ - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>.
An example would be:
@code
More information about the Orxonox-commit
mailing list