[1505] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
[1502] | 4 | * |
---|
[1505] | 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
[1502] | 22 | * Author: |
---|
[1604] | 23 | * Reto Grieder |
---|
[1502] | 24 | * Co-authors: |
---|
[1604] | 25 | * ... |
---|
[1502] | 26 | * |
---|
| 27 | */ |
---|
[1362] | 28 | |
---|
[1601] | 29 | #ifndef _OverlayGroup_H__ |
---|
| 30 | #define _OverlayGroup_H__ |
---|
[1362] | 31 | |
---|
[1502] | 32 | #include "OrxonoxPrereqs.h" |
---|
| 33 | |
---|
[1604] | 34 | #include <map> |
---|
[1502] | 35 | #include <OgrePrerequisites.h> |
---|
[1588] | 36 | #include "core/BaseObject.h" |
---|
[1502] | 37 | #include "util/Math.h" |
---|
[1362] | 38 | |
---|
| 39 | namespace orxonox |
---|
| 40 | { |
---|
[1588] | 41 | class HUDBar; |
---|
[1601] | 42 | class OrxonoxOverlay; |
---|
[1588] | 43 | |
---|
[1604] | 44 | class _OrxonoxExport OverlayGroup : public BaseObject |
---|
[1362] | 45 | { |
---|
[1502] | 46 | public: |
---|
[1601] | 47 | OverlayGroup(); |
---|
| 48 | ~OverlayGroup(); |
---|
[1567] | 49 | |
---|
[1588] | 50 | virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); |
---|
| 51 | |
---|
[1604] | 52 | void scale(const Vector2& scale); |
---|
| 53 | Vector2 getScale() const { return this->scale_; } |
---|
[1564] | 54 | |
---|
[1604] | 55 | static void toggleVisibility(const std::string& name); |
---|
[1601] | 56 | static OverlayGroup& getHUD(); |
---|
[1567] | 57 | |
---|
[1564] | 58 | private: |
---|
[1601] | 59 | OverlayGroup(const OverlayGroup& instance); |
---|
[1564] | 60 | |
---|
[1601] | 61 | void addElement(OrxonoxOverlay* element); |
---|
| 62 | OrxonoxOverlay* getElement(unsigned int index); |
---|
[1588] | 63 | |
---|
[1601] | 64 | std::map<std::string, OrxonoxOverlay*> hudElements_; |
---|
[1604] | 65 | Vector2 scale_; |
---|
[1588] | 66 | |
---|
[1601] | 67 | static OverlayGroup* hudInstance_s; |
---|
[1362] | 68 | }; |
---|
| 69 | } |
---|
| 70 | |
---|
[1601] | 71 | #endif /* _OverlayGroup_H__ */ |
---|