Changeset 1747 for code/trunk/src/orxonox/overlays
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r1633 r1747 51 51 std::map<std::string, OrxonoxOverlay*> OrxonoxOverlay::overlays_s; 52 52 53 SetConsoleCommand(OrxonoxOverlay, scaleOverlay, false). setAccessLevel(AccessLevel::User);54 SetConsoleCommand(OrxonoxOverlay, scrollOverlay, false). setAccessLevel(AccessLevel::User);55 SetConsoleCommand(OrxonoxOverlay, rotateOverlay, false). setAccessLevel(AccessLevel::User);53 SetConsoleCommand(OrxonoxOverlay, scaleOverlay, false).accessLevel(AccessLevel::User); 54 SetConsoleCommand(OrxonoxOverlay, scrollOverlay, false).accessLevel(AccessLevel::User); 55 SetConsoleCommand(OrxonoxOverlay, rotateOverlay, false).accessLevel(AccessLevel::User); 56 56 57 57 OrxonoxOverlay::OrxonoxOverlay() … … 84 84 @brief 85 85 Loads the OrxonoxOverlay. 86 86 87 87 This has to be called before usage, otherwise strange behaviour is 88 88 guaranteed! (there should be no segfaults however). … … 92 92 void OrxonoxOverlay::XMLPort(Element& xmlElement, XMLPort::Mode mode) 93 93 { 94 BaseObject::XMLPort(xmlElement, mode);94 SUPER(OrxonoxOverlay, XMLPort, xmlElement, mode); 95 95 96 96 if (mode == XMLPort::LoadObject) … … 267 267 if (angle > Ogre::Math::PI * 0.5) 268 268 angle = Ogre::Math::PI - angle; 269 269 270 270 // do some mathematical fiddling for a bounding box 271 271 Vector2 actualSize = size_ * sizeCorrection_; -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
r1633 r1747 150 150 static void rotateOverlay(const std::string& name, const Degree& angle); 151 151 152 virtual void changedVisibility(); 153 152 154 protected: 153 virtual void changedVisibility();154 155 virtual void angleChanged(); 155 156 virtual void sizeCorrectionChanged(); -
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r1633 r1747 35 35 #include "OverlayGroup.h" 36 36 37 #include " core/Debug.h"37 #include "util/Debug.h" 38 38 #include "core/ConsoleCommand.h" 39 39 #include "core/CoreIncludes.h" 40 #include "core/Iterator.h" 40 41 #include "core/XMLPort.h" 41 42 #include "OrxonoxOverlay.h" … … 45 46 CreateFactory(OverlayGroup); 46 47 47 SetConsoleCommand(OverlayGroup, toggleVisibility, false). setAccessLevel(AccessLevel::User);48 SetConsoleCommand(OverlayGroup, scaleGroup, false). setAccessLevel(AccessLevel::User);49 SetConsoleCommand(OverlayGroup, scrollGroup, false). setAccessLevel(AccessLevel::User);48 SetConsoleCommand(OverlayGroup, toggleVisibility, false).accessLevel(AccessLevel::User); 49 SetConsoleCommand(OverlayGroup, scaleGroup, false).accessLevel(AccessLevel::User); 50 SetConsoleCommand(OverlayGroup, scrollGroup, false).accessLevel(AccessLevel::User); 50 51 51 52 OverlayGroup::OverlayGroup() … … 62 63 void OverlayGroup::XMLPort(Element& xmlElement, XMLPort::Mode mode) 63 64 { 64 BaseObject::XMLPort(xmlElement, mode);65 SUPER(OverlayGroup, XMLPort, xmlElement, mode); 65 66 66 67 XMLPortParam(OverlayGroup, "scale", setScale, getScale, xmlElement, mode).defaultValues(Vector2(1.0, 1.0)); … … 135 136 /*static*/ void OverlayGroup::toggleVisibility(const std::string& name) 136 137 { 137 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)138 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 138 139 { 139 140 if ((*it)->getName() == name) … … 151 152 /*static*/ void OverlayGroup::scaleGroup(const std::string& name, float scale) 152 153 { 153 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)154 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 154 155 { 155 156 if ((*it)->getName() == name) … … 167 168 /*static*/ void OverlayGroup::scrollGroup(const std::string& name, const Vector2& scroll) 168 169 { 169 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)170 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 170 171 { 171 172 if ((*it)->getName() == name) -
code/trunk/src/orxonox/overlays/OverlayGroup.h
r1633 r1747 58 58 ~OverlayGroup() { } 59 59 60 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);60 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 61 61 62 62 static void toggleVisibility(const std::string& name); 63 63 static void scaleGroup(const std::string& name, float scale); 64 64 static void scrollGroup(const std::string& name, const Vector2& scroll); 65 66 void changedVisibility(); 65 67 66 68 private: … … 80 82 OrxonoxOverlay* getElement(unsigned int index); 81 83 82 void changedVisibility();83 84 84 std::map<std::string, OrxonoxOverlay*> hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 85 85 Vector2 scale_; //!< Current scale (independant of the elements). -
code/trunk/src/orxonox/overlays/OverlayText.cc
r1632 r1747 57 57 void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode) 58 58 { 59 OrxonoxOverlay::XMLPort(xmlElement, mode);59 SUPER(OverlayText, XMLPort, xmlElement, mode); 60 60 61 61 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r1633 r1747 41 41 #include "util/Math.h" 42 42 #include "util/Convert.h" 43 #include " core/Debug.h"43 #include "util/Debug.h" 44 44 #include "core/CoreIncludes.h" 45 45 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r1625 r1747 50 50 void setConfigValues(); 51 51 52 v oid tick(float dt);52 virtual void tick(float dt); 53 53 54 54 static InGameConsole& getInstance(); -
code/trunk/src/orxonox/overlays/debug/DebugFPSText.h
r1625 r1747 43 43 ~DebugFPSText(); 44 44 45 private: 46 void tick(float dt); 47 48 private: 45 virtual void tick(float dt); 49 46 }; 50 47 } -
code/trunk/src/orxonox/overlays/debug/DebugRTRText.h
r1625 r1747 43 43 ~DebugRTRText(); 44 44 45 private: 46 void tick(float dt); 45 virtual void tick(float dt); 47 46 }; 48 47 } -
code/trunk/src/orxonox/overlays/hud/HUDBar.cc
r1628 r1747 53 53 void BarColour::XMLPort(Element& xmlElement, XMLPort::Mode mode) 54 54 { 55 BaseObject::XMLPort(xmlElement, mode);55 SUPER(BarColour, XMLPort, xmlElement, mode); 56 56 57 57 XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode) … … 78 78 void HUDBar::XMLPort(Element& xmlElement, XMLPort::Mode mode) 79 79 { 80 OrxonoxOverlay::XMLPort(xmlElement, mode);80 SUPER(HUDBar, XMLPort, xmlElement, mode); 81 81 82 82 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/hud/HUDBar.h
r1627 r1747 47 47 ~BarColour() { } 48 48 49 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);49 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 50 50 51 51 void setColour(const ColourValue& colour) { this->colour_ = colour; } -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
r1628 r1747 69 69 void HUDNavigation::XMLPort(Element& xmlElement, XMLPort::Mode mode) 70 70 { 71 OrxonoxOverlay::XMLPort(xmlElement, mode);71 SUPER(HUDNavigation, XMLPort, xmlElement, mode); 72 72 73 73 if (mode == XMLPort::LoadObject) … … 87 87 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr())); 88 88 aimMarker_->setMaterialName("Orxonox/NavCrosshair"); 89 89 90 90 background_->addChild(navMarker_); 91 91 background_->addChild(aimMarker_); -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.h
r1627 r1747 44 44 ~HUDNavigation(); 45 45 46 void XMLPort(Element& xmlElement, XMLPort::Mode mode); 46 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 47 virtual void tick(float dt); 47 48 48 49 private: … … 50 51 void angleChanged() { } 51 52 void positionChanged() { } 52 53 void tick(float dt);54 53 55 54 // XMLPort accessors -
code/trunk/src/orxonox/overlays/hud/HUDRadar.cc
r1628 r1747 66 66 void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode) 67 67 { 68 OrxonoxOverlay::XMLPort(xmlElement, mode);68 SUPER(HUDRadar, XMLPort, xmlElement, mode); 69 69 70 70 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/hud/HUDRadar.h
r1625 r1747 48 48 ~HUDRadar(); 49 49 50 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);50 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 51 51 52 52 private: -
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h
r1625 r1747 44 44 ~HUDSpeedBar(); 45 45 46 private: 47 void tick(float dt); 46 virtual void tick(float dt); 48 47 }; 49 48 }
Note: See TracChangeset
for help on using the changeset viewer.