• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

Small footprint UI library for hardware accelerated games & applications


コミットメタ情報

リビジョン1430affe88eafca84d971a0c065bdd0e91ee0414 (tree)
日時2016-12-22 05:29:38
作者Emil Segerås <emilsegers@gmai...>
コミッターEmil Segerås

ログメッセージ

TBSkin::Load should be callable multiple times.

変更サマリ

差分

--- a/src/tb/tb_skin.cpp
+++ b/src/tb/tb_skin.cpp
@@ -128,6 +128,12 @@ TBSkin::TBSkin()
128128
129129 bool TBSkin::Load(const char *skin_file, const char *override_skin_file)
130130 {
131+ // Clear and previously loaded data.
132+ UnloadBitmaps();
133+ m_elements.DeleteAll();
134+ m_shape_nodes.Clear();
135+
136+ // Load
131137 if (!LoadInternal(skin_file))
132138 return false;
133139 if (override_skin_file && !LoadInternal(override_skin_file))
--- a/src/tb/tb_skin.h
+++ b/src/tb/tb_skin.h
@@ -303,6 +303,8 @@ public:
303303 If the skin use font glyphs, the font engine and used font has to be initialized
304304 already. Otherwise the correct font won't be used.
305305
306+ May be called multiple times to reload skin.
307+
306308 Returns true on success, and all bitmaps referred to also loaded successfully. */
307309 bool Load(const char *skin_file, const char *override_skin_file = nullptr);
308310