jtransc / gdx-backend-jtransc

GDX backend for JTransc: targeting every platform lime supports (html5, windows, linux, mac, android, ios...) (flash is wip) (consoles + unity likely to be supported in the future)
23 stars 6 forks source link

How provide different icons for targets #53

Closed ghost closed 7 years ago

ghost commented 7 years ago

How provide different icons for different targets? Also how override default multiply icons for iOS/Android?

soywiz commented 7 years ago

Sorry for the delay. Going to check lime/openfl documentation.

soywiz commented 7 years ago

http://www.openfl.org/lime/docs/project-files/xml-format/

http://www.openfl.org/lime/docs/project-files/hxp-format/

soywiz commented 7 years ago

The iOS part:

<config:ios prerendered-icon="false" />

Regarding to different icons, don't see any options for that.

soywiz commented 7 years ago

So for implementing the prerender part: https://github.com/jtransc/gdx-backend-jtransc/blob/master/gdx-backend-jtransc/resources/program.xml#L30

With jtransc you can use extra:

In gradle:

jtransc {
    param("prerenderedIcon", "true")
}

In the program.xml file template:

{% if extra.prerenderedIcon %}
<config:ios prerendered-icon="false" />
{% endif %}

That way it is configurable.

ghost commented 7 years ago

Thanks for information, i will try now

soywiz commented 7 years ago

And for the icon maybe we can do something like (if it doesn't we can add the variable target to jtransc; also not sure if I implemented elseif, but I can implement it too or just use if else chains):

{% if target == 'android' && extra.androidIcon %}
    <icon path="{{ extra.androidIcon  }}" />
{% elseif target == 'ios' && extra.iosIcon %}
    <icon path="{{ extra.iosIcon  }}" />
{% elseif hasIcon  %}
    <icon path="{{ settings.icon }}" />
{% end %}

And in gradle:

param("androidIcon", "...")
param("iosIcon", "...")
ghost commented 7 years ago

confirmed fixed