Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
i'm having some trouble with the dialogprogress.xml.
i have this in the file.
<control>
<description>progress control</description>
<type>progress</type>
<id>20</id>
<posx>200</posx>
<posy>340</posy>
<texturebg>progressback.png</texturebg>
<lefttexture>progressleft.png</lefttexture>
<midtexture>progressmid.png</midtexture>
<righttexture>progressright.png</righttexture>
<overlaytexture>progressover.png</overlaytexture>
<visible>no</visible>
</control>
the width for progressmid.png and progressover.png are both 260 pixels.
it displays, but the midtexture seems hard coded to a set width no matter how wide i make the .png and a <width> setting seems to be ignored. also the <posx> and <posy> don't seem to work off the <coordinates> system like the other controls.
am i missing something or is this known behavior.
thanks
Posts: 323
Joined: Feb 2004
Reputation:
0
the width is given in the references..
its using the same width for all textures
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
thanks for your response,
there is no width in references for the progress dialog and it doesn't stretch <overlaytexture> only <midtexture>. i've tried <texturewidth>260</texturewidth> and <width>260</width> neither has any effect.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
the width + height for the total control is taken from the background texture.
the midtexture is scaled + positioned so that it fits in between the left + right textures (which aren't scaled).
the overlay texture is positioned so that it is centered over the background texture but is not scaled in any way. this allows overlays which don't cover the full background width or height for instance.
hope this makes sense. once you have it working and understand what is going on, perhaps you could add this to the wiki skinning section? it's better if it's written by a skinner rather than a dev (so that it's in skinner-speak rather than dev-speak).
cheers,
jonathan
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
yes, but only for the progress control. the other controls work fine.
example:
<coordinates>
<system>1</system>
<posx>150</posx>
<posy>180</posy>
</coordinates>
<control>
<description>dialog line 3</description>
<type>label</type>
<id>4</id>
<posx>69</posx>
<posy>120</posy>
<label>0</label>
<font>fontdialog16</font>
<textcolor>ffffffff</textcolor>
</control>
<control>
<description>progress control</description>
<type>progress</type>
<id>20</id>
<posx>200</posx>
<posy>340</posy>
<visible>no</visible>
</control>
the dialog line 3 displays where it should, but i have to set the progress control x and y based on the screen not the <coordinates>.
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
hi jonathan,
if you get this, thanks for the fix.
now i'm doing the musicoverlay.xml and the <coordinates> is not working for the whole file. none of the controls use the windows <posx> or <posy>.
thanks
Posts: 26,215
Joined: Oct 2003
Reputation:
187
correct. this is due to the way it currently slides in, and is unfortunately hard-coded in this way. nothing that can be done about it until the slide-in code is completely removed (we're thinking of replacing the white button action in visz with a nice fade in/fade out of controls in the actual visz window, rather than sliding in/out the music overlay).
cheers,
jonathan