Mercurial > molko
comparison librpg/rpg/message.h @ 174:6992085d47fd
ui: major theme overhaul, closes #2509 @1h
- The font does not contain a color anymore,
- Add a new color argument to font_render,
- Theme are stored `const` in UI elements to promise no modifications,
- Also make all <ui>_draw function to take a const widget too.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 22 Oct 2020 15:16:43 +0200 |
parents | e05a792f6910 |
children | 64f24b482722 |
comparison
equal
deleted
inserted
replaced
173:cd69c8791dac | 174:6992085d47fd |
---|---|
132 unsigned int timeout; /*!< (+) Timeout in milliseconds. */ | 132 unsigned int timeout; /*!< (+) Timeout in milliseconds. */ |
133 const char *text[MESSAGE_LINES_MAX]; /*!< (+) Lines of text to show. */ | 133 const char *text[MESSAGE_LINES_MAX]; /*!< (+) Lines of text to show. */ |
134 unsigned int index; /*!< (+) Line selected */ | 134 unsigned int index; /*!< (+) Line selected */ |
135 enum message_flags flags; /*!< (+) Message flags */ | 135 enum message_flags flags; /*!< (+) Message flags */ |
136 enum message_state state; /*!< (-) Current state */ | 136 enum message_state state; /*!< (-) Current state */ |
137 struct theme *theme; /*!< (+&?) Theme to use. */ | 137 const struct theme *theme; /*!< (+&?) Theme to use. */ |
138 unsigned int elapsed; /*!< (-) Time elapsed. */ | 138 unsigned int elapsed; /*!< (-) Time elapsed. */ |
139 double scale; /*!< (-) Current scale [0-1]. */ | 139 double scale; /*!< (-) Current scale [0-1]. */ |
140 }; | 140 }; |
141 | 141 |
142 /** | 142 /** |
192 * | 192 * |
193 * \pre msg != NULL | 193 * \pre msg != NULL |
194 * \param msg the message | 194 * \param msg the message |
195 */ | 195 */ |
196 void | 196 void |
197 message_draw(struct message *msg); | 197 message_draw(const struct message *msg); |
198 | 198 |
199 /** | 199 /** |
200 * Start hiding the message. | 200 * Start hiding the message. |
201 * | 201 * |
202 * \pre msg != NULL | 202 * \pre msg != NULL |