Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Exposing project properties at runtime — Gideros Forum

Exposing project properties at runtime

moopfmoopf Guru
edited October 2012 in Suggestions & requests
Is there any possibility that you could expose more project properties at runtime. For example, it would be useful to be able to obtain the selected image suffix and image scale in use through the application class.

Comments

  • atilimatilim Maintainer
    edited October 2012 Accepted Answer
    Yes I can add. Also my internal implementation takes the suffix of the nearest scale. For example assume that you have image scales as:
    1 -> base
    2 -> <a href="http://forum.giderosmobile.com/profile/2x" rel="nofollow">@2x</a>
    4 -> <a href="http://forum.giderosmobile.com/profile/4x" rel="nofollow">@4x</a>
    Then the selection algorithm is like:
    scale = (logicalScaleX + logicalScaleY) / 2
     
    if scale < 1.5 then select base
    if 1.5 <= scale < 3 then select <a href="http://forum.giderosmobile.com/profile/2x" rel="nofollow">@2x</a>
    if 3 <= scale then select <a href="http://forum.giderosmobile.com/profile/4x" rel="nofollow">@4x</a>

    Likes: hgvyas123

    +1 -1 (+1 / -0 )Share on Facebook
  • Excellent, thank you @atilim - will make things like the change I made to BMFont earlier today easier and not need you to track your own extensions and scales as well.
Sign In or Register to comment.