Use custom feathers theme with Starling Builder

You can compile a theme into an extension to use it in the editor. Here are the instructions:

  • This is an sample project that compiled a modified version of MetalWorksMobileTheme into a swf.
  • Copy your theme into the project, change EditorGameTheme to extends your theme instead.
  • Build the project to make the swf
  • Put the swf inside YOUR_WORKSPACE/libs and restart the editor

Here’s a working example where the UI editor and the canvas are running with different themes

Tips for Feathers 3.x themes

In Feathers 3.x, mobile themes have one major change: The theme texture is loaded with a default scale of 2 instead of 1. While this change works with ScreenDensityScaleFactoryManager, it doesn’t play nice with Starling Builder multiple resolution approach. To solve this problem you have 2 choices:

  1. Don't use ScreenDensityScaleFactoryManager. However you will need to change the feathers theme in your app default scale to 1 instead of 2. This will make the themes work just like those in Feathers 2.x, which is already implemented in the demo project as an example. You can check out how to alter MetalMobileTheme from here.
  2. Don't use Starling Builder multiple resolution approach, use ScreenDensityScaleFactoryManager instead. This way you don’t need to change the scale of the theme in your app, but you will need to build a different theme extension for your editor, or simply replace the default EmbeddedTheme.swf with this one. For more information check out the Fee Splitter apphttp://github.com/yuhengh/fee-splitter-app
optiontheme extension scaletheme scale
Starling Builder multiple resolution approach11
ScreenDensityScaleFactoryManager22

It’s your decision to choose which one to use. The 1st approach scales the stage based on design and device resolution, which is best for games independent to physical size and resolution. The 2nd approach scales the stage based on screen density, which is best for apps dependent on device DPI.

  builder/theme.txt · Last modified: 2017/04/15 15:44 by johannh
 
Powered by DokuWiki