Player.ProgressCache texture show at 10
#1
Hi,

I need help. I use png´s as a texture for a progress bar. but I start at 10 not 0
pictures called 0.png-100.png the id="22" gives numbers from 0-100
What do I have to do

Quote:<control type="progress" id="32">
<animation effect="slide" start="0,-238" end="0,0" time="240" tween="quadratic">WindowOpen</animation>
<animation effect="slide" end="0,-238" start="0,0" time="240" tween="quadratic">WindowClose</animation>
<description>progress control</description>
<left>0</left>
<top>2</top>
<width>105</width>
<height>200</height>
<colordiffuse>006db9e5</colordiffuse>
<info>Player.ProgressCache</info>
</control>
<control type="image">
<top>90</top>
<left>155</left>
<width>390</width>
<height>390</height>
<aligny>top</aligny>
<animation effect="rotate" end="-360" center="auto" time="4000" loop="true" reversible="false" condition="!Player.Paused">Conditional</animation>
<texture background="true">$INFO[Control.GetLabel(32),progress/,.png]</texture>
</control>

this is the code I wrote.

also the pictures flicker while change. How can I solve this issue
Please help.
Reply
#2
Add a label somewhere that displays Control.GetLabel(32) and you should see what's happening.
Reply
#3
I did it as I wrote and it shows number from 0 to 100
Reply
#4
iirc, there is a leading space for numbers 0-9.
e.g. if you added foo to the start of the file name it would be

foo 0.png
foo 5.png
foo15.png
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
all right, thats it. why didn't I had the idea.

Now please help preload the images.
How can I do this?
Reply
#6
remove background="true" from the texture tag.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#7
Code:
<control type="progress" id="32">
                <animation effect="slide" start="0,-238" end="0,0" time="240" tween="quadratic">WindowOpen</animation>
                <animation effect="slide" end="0,-238" start="0,0" time="240" tween="quadratic">WindowClose</animation>
                <description>progress control</description>
                <left>0</left>
                <top>2</top>
                <width>105</width>
                <height>200</height>
                <colordiffuse>006db9e5</colordiffuse>
                <info>Player.ProgressCache</info>
            </control>
            <control type="image">
                <top>90</top>
                    <left>155</left>
                    <width>390</width>
                    <height>390</height>
                    <aligny>top</aligny>
                <animation effect="rotate" end="-360" center="auto" time="4000" loop="true" reversible="false" condition="!Player.Paused">Conditional</animation>
                <texture>$INFO[Control.GetLabel(32),progress/a,.png]</texture>
            </control>
            <control type="image">
                <top>90</top>
                <left>540</left>
                <width>390</width>
                <height>390</height>
                <aligny>top</aligny>
                <aspectratio align="left">keep</aspectratio>
                <animation effect="rotate" end="-360" center="auto" time="4800" loop="true" reversible="false" condition="!Player.Paused">Conditional</animation>
                <texture>$INFO[Control.GetLabel(32),progress-right/a,.png]</texture>
            </control>

still flickering on load.

image is 400x400px around 100kb

O.K. after a rework it seem to Work. Very Nice.
Reply

Logout Mark Read Team Forum Stats Members Help
Player.ProgressCache texture show at 100