DIY battery bar! It’s an empty icon, with a white background, that binding for the width, and a height of 5px

DIY battery bar! It’s an empty icon, with a white background, that binding for the width, and a height of 5px

]]>

11 Commentsto DIY battery bar! It’s an empty icon, with a white background, that binding for the width, and a height of 5px

  1. Anonymous says:

    < ![CDATA[

    When testing I changed 0.01 to 0.0001. Otherwise, the width get huge. But, I can’t understand how to make the height 5px.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    The width is supposed to be 100% battery equals 100% screen width. If you want it to not fill the whole screen, tweaking that works.



    Is your object detached from the grid? Select it and use the + looking tool to set the height

    ]]>

  3. Anonymous says:

    < ![CDATA[

    You can even colorize your line from red to green depending on the battery percentage



    https://lh3.googleusercontent.com/odI9cs2vNxvr-m4_ywHStYQiVEX1D-jUusSmTyo0qki6GGv2735HtP4mN4_noS_boh2J-VvgOD0

    ]]>

  4. Anonymous says:

    < ![CDATA[

    That’s a great idea!


    Here are binding codes for easier copy-paste :



    Width : (($bat_level) * 0.01) * $screen_width


    Normal color : Color.HSVToColor([animate(“$bat_level”)/100*120,1,1])


    Visibility : $Home_top



    Enjoy !



    EDIT : I had to add spaces in Width line to prevent Markdown formating due to “*” caracters. You may have to remove them manullay

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Bruno-Isa LAMOUR-ARNOULD : how do you add the “%” symbol after battery percentage? When I edit text format and put “0 %” it shows 6500% instead of 65%.


    Thanks

    ]]>

  6. Anonymous says:

    < ![CDATA[

    ($bat_level)+”%”

    ]]>

  7. Anonymous says:

    < ![CDATA[

    If you make that the binding for the label of a text item, it should work

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Bruno-Isa LAMOUR-ARNOULD​ thanks a lot. I tried the double quote but not the simple quote. 😅


    PS : To have icon color changing regarding battery status you have to use “Colorize” binding.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Lionel SANCHEZ​ normal color is what I’ve set and working fine about text.


    Icon yes I know

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *