Finishing the Preferences screen
Not much has happened (as in new features) since the last blog entry. There are 2 main things, that needs mentioning.
- AssetRefMockerManager was moved to the BootstrapManager class. Because BootstrapManager is now a singleton then there is no need to be AssetRefMockerManager in each scene. Therefor, it was made as part of the BootstrapManager class. Because of this, the code required some changes. The one reason was, that while the AssetRefMockerManager was in the each scene, then on the start of scene all the ref mockers could be loaded. But now, the Start()method is run only in the bootstrap scene so therefor batching mode was implemented. That is, when the batching mode is on, the asset ref mockers are just registered. And only after all the mocker are present they are loaded.
- Implementation of the fast help text (FHT, a.k.a. tooltips). This was implemented using separate canvas in the bootstrap scene. There the FHT would be shown, always on the top. The FHT consist of two parts. The FastHelpTextComponent which is used for game objects, which will have some tooltip info. And the FastHelpTextRendererComponent which is actually used for rendering the text. The glue between those two is FastHelpTextManager. Because of how are FHT implemented, the "control" characters in the text (like "|") were replaced with tag based (like <b>...</b>). Then, they're further processed to TMP's rich text tags (like <font>, <color>, ...). For instance | is processed as custom font and custom color. The custom font is needed, because the text should be bold. And because a bitmap fonts are used, for bold text the separate font need be used (well this is not strictly true, as even with bitmap fonts one can used "weight table" but it is much harder implement it in our situation, because of "embedded" font assets int .sti assets). Then color tag is used for the color (which is defined as a field in FastHelpTextComponent.
There were also some minor changes, like fixing the focus "bug" in the preference item prefab (when the item was unchecked, it still retained in the "selected" state, so the sprite wasn't changed. This was fixed with disabled "Navigation"). Also, sound volume settings changes are now reflected in the appropriate mixer. Then there was implemented color change on focus for Toggle4State and changing the default colors for the buttons and preferences item in preferences screen.

Comments