1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef NL_FLYING_TEXT_MANAGER_H
22 #define NL_FLYING_TEXT_MANAGER_H
24 #include "nel/misc/types_nl.h"
25 #include "interface_pointer.h"
26 #include "nel/misc/rgba.h"
27 #include "nel/misc/vector.h"
32 // ***************************************************************************
34 * A Manager that manage allocation and display of flying text
35 * \author Lionel Berenguier
36 * \author Nevrax France
39 class CFlyingTextManager
45 ~CFlyingTextManager();
47 /// Called by CInterfaceManager::initInGame()
49 /// Called by CInterfaceManager::releaseInGame()
52 /** add a flying text at a position (called during entity display). NB: may fail if no more free groups
53 * \param offsetx: screen offsetx of the group in scene
55 void addFlyingText(void *key
, const std::string
&text
, const NLMISC::CVector
&pos
, NLMISC::CRGBA color
, float scale
, sint offsetX
=0);
56 /// release no more used flying text (called by CEntityManager at each draw)
57 void releaseNotUsedFlyingText();
59 /// get the special offsetX for character (from define)
60 sint
getOffsetXForCharacter() const {return _CharacterWindowOffsetX
;}
65 class CGroupInScene
*GroupInScene
;
66 class CViewText
*ViewText
;
77 std::vector
<CGroupInfo
> _InScenePool
;
78 // interface currently displayed
79 typedef std::map
<void *, CGroupInfo
> TInSceneCurrentMap
;
80 TInSceneCurrentMap _InSceneCurrent
;
82 CInterfaceGroupPtr _Root
;
83 // special decal for character
84 sint _CharacterWindowOffsetX
;
87 void linkToInterface(CGroupInfo
&gi
);
88 void unlinkToInterface(CGroupInfo
&gi
);
92 #endif // NL_FLYING_TEXT_MANAGER_H
94 /* End of flying_text_manager.h */