- Timestamp:
- May 11, 2011, 10:45:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/src/modules/notifications/NotificationQueueCEGUI.h
r8446 r8448 39 39 40 40 #include <string> 41 #include "util/Math.h" 41 42 42 43 #include "NotificationManager.h" 44 43 45 #include "NotificationQueue.h" 44 46 … … 46 48 { // tolua_export 47 49 48 //TODO: Update.49 50 /** 50 51 @brief 51 Displays @ref orxonox::Notification "Notifications" from specific senders.52 Displays @ref orxonox::Notification "Notifications" using CEGUI. 52 53 53 There are quite some parameters that influence the behavior of the NotificationQueue: 54 - @b name The name of the NotificationQueue. It needs to be unique. 55 - @b senders The senders that are targets of this NotificationQueue, i.e. the names of senders whose Notifications this NotificationQueue displays. 56 - @b size The size of the NotificationQueue, it specifies how many @ref orxonox::Notification "Notifications" are displayed at once at the most. 57 - @b displayTime The time a @ref orxonox::Notification "Notification" is displayed with this NotificationQueue. 54 Apart form the parameters inherited by the @ref orxonox::NotificationQueue "NotificationQueue", there are some more parameters that influence the behavior of the NotificationQueueCEGUI: 55 - @b displaySize The size of the window that displays the NotificationQueue. 56 - @b position The position if the window that displays the NotificationQueue. 57 - @b alignment The horizontal alignment of the displayed Notifications. 58 - @b fontSize The font size of the displayed Notifications. 59 - @b fontColor The font color of the displayed Notifications. 58 60 59 61 @author 60 62 Damian 'Mozork' Frick 61 63 64 @see NotificationQueue 62 65 @ingroup Notifications 63 66 */ … … 70 73 virtual ~NotificationQueueCEGUI(); 71 74 72 //! Destroys the NotificationQueue. 73 void destroy(bool noGraphics = false); // tolua_export 75 void destroy(bool noGraphics = false); // Destroys the NotificationQueue. 76 77 /** 78 @brief Set the size of the window that displays the NotificationQueue. 79 @param size A vector whose first component is the relative width of the window (a value between 0 and 1) and whose second component is the absolute width in pixels (additional to the relative width, can be negative). The height is set such that exactly as many Notifications fit as is the maximum size of the NotificationQueue (in terms of the number of Notifications). 80 */ 81 inline void setDisplaySize(const Vector2& size) 82 { this->setDisplaySize(Vector4(size.x, size.y, 0.0, 0.0)); } 83 void setDisplaySize(const Vector4& size); // Set the size of the window that displays the NotificationQueue. 84 /** 85 @brief Get the size of the window that displays the NotificationQueue. 86 @return Returns a vector with the display size. 87 */ 88 inline const Vector4& getDisplaySize(void) const 89 { return this->displaySize_; } 90 91 void setPosition(const Vector4& position); // Set the position of the window that displays the NotificationQueue. 92 /** 93 @brief Get the position of the window that displays the NotificationQueue. 94 @return Returns a vector with the position. 95 */ 96 inline const Vector4& getPosition(void) const 97 { return this->position_; } 98 99 void setAlignment(const std::string& alignment); // Set the horizontal alignment of the Notifications text. 100 /** 101 @brief Get the horizontal alignment of the Notifications text. 102 @return Returns a string with the horizontal alignment property. 103 */ 104 inline const std::string& getAlignment(void) 105 { return this->alignment_; } 106 107 void setFontSize(unsigned int size); // Set the font size of the text displayed by this NotificationQueue. 108 /** 109 @brief Get the font size of the text displayed by this NotificationQueue. 110 @return Returns the font size. 111 */ 112 inline unsigned int getFontSize(void) 113 { return this->fontSize_; } 114 115 void setFontColor(const Vector4& color); // Set the font color if the text displayed by this NotificationQueue. 116 /** 117 @brief Get the font color of the text displayed by this NotificationQueue. 118 @return Returns a vector with the components being RGBA, with values from 0 to 1. 119 */ 120 inline const Vector4& getFontColor(void) const 121 { return this->fontColor_; } 122 /** 123 @brief Get the font color of the text displayed by this NotificationQueue. 124 @return Returns a string with the ARGB values in hexadecimal format. 125 */ 126 inline const std::string& getFontColorStr(void) const 127 { return this->fontColorStr_; } 128 129 static NotificationQueueCEGUI* getQueue(const std::string& name); // tolua_export 74 130 75 131 protected: … … 81 137 82 138 private: 83 void create(void); // Creates the NotificationQueue in lua. 139 Vector4 displaySize_; //!< The size of the window that displays the NotificationQueue. 140 Vector4 position_; //!< The position of the window that displays the NotificationQueue. 141 std::string alignment_; //!< The horizontal alignment of the Notifications text. 142 unsigned int fontSize_; //!< The font size of the Notifications text. 143 Vector4 fontColor_; //!< The font color of the Notifications text as a vector, in RGBA form, with values from 0 to 1. 144 std::string fontColorStr_; //!< The font color of the Notifications text as a string with the ARGB hexadecimal values. 145 146 void create(void); // Creates the NotificationQueue in lua. 84 147 85 148 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.