Small footprint UI library for hardware accelerated games & applications
Revision | 1430affe88eafca84d971a0c065bdd0e91ee0414 (tree) |
---|---|
Zeit | 2016-12-22 05:29:38 |
Autor | Emil Segerås <emilsegers@gmai...> |
Commiter | Emil Segerås |
TBSkin::Load should be callable multiple times.
@@ -128,6 +128,12 @@ TBSkin::TBSkin() | ||
128 | 128 | |
129 | 129 | bool TBSkin::Load(const char *skin_file, const char *override_skin_file) |
130 | 130 | { |
131 | + // Clear and previously loaded data. | |
132 | + UnloadBitmaps(); | |
133 | + m_elements.DeleteAll(); | |
134 | + m_shape_nodes.Clear(); | |
135 | + | |
136 | + // Load | |
131 | 137 | if (!LoadInternal(skin_file)) |
132 | 138 | return false; |
133 | 139 | if (override_skin_file && !LoadInternal(override_skin_file)) |
@@ -303,6 +303,8 @@ public: | ||
303 | 303 | If the skin use font glyphs, the font engine and used font has to be initialized |
304 | 304 | already. Otherwise the correct font won't be used. |
305 | 305 | |
306 | + May be called multiple times to reload skin. | |
307 | + | |
306 | 308 | Returns true on success, and all bitmaps referred to also loaded successfully. */ |
307 | 309 | bool Load(const char *skin_file, const char *override_skin_file = nullptr); |
308 | 310 |