Jump to content

Special panel ? (news linked object.xml problem)


Anthe

Recommended Posts

Hi guys,

A have a little problem with news linked object.xml.

I managed to add images but I can't assign to these same images the colors of the team.

Yet text has had the secondary color of the club, but no way for images. I think there is a way but which ?

There is a screenshot : You can see text is secondary colour but graphics not (I have madded red like titlebar team color bar)

sanstitre2xe6.jpg

There is code :

<panel>

<layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0" />
<layout class="fit_children_attachment" alignment="vertical" gap="0" />
<layout class="arrange_vertical_attachment" alignment="top" gap="0" offset="0" />

<container class="titled_box" text="" appearance="boxes/dialog">

	<layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
	<layout class="fit_children_attachment" alignment="vertical,fill" gap="0" />
	<layout class="arrange_vertical_attachment" alignment="bottom,extend" gap="0" offset="0" />

	<!-- picture: an image, innit -->
	<widget class="group_box" id="pibx">
		<layout class="fit_children_attachment" alignment="vertical,fill" gap="0" />
		<widget class="picture" id="pict" scale_picture="true" keep_aspect_ratio="true" height="90" width="90" image_alignment="centre">
			<layout class="centre_in_parent_attachment" alignment="horizontal" offset="0"/>
			<layout class="stick_to_sides_attachment" alignment="bottom" inset="0"/>
		</widget>
	</widget>

	<widget class="table" id="info" layout="-2,-3" stretch_to_fit_rows="true" mode="fill_rows, stripe_rows">
		<boolean id="auto_size_rows" value="true"/>
		<boolean id="fixed_size_rows" value="true"/>

        <list id="column_properties">
			<record index="0" alignment="left, centre_y" />
            <record index="1" alignment="right, centre_y" use_format="short" icon_alignment="right,can_scale" colour="selection" />
		</list>

		<!-- row indents -->
		<list id="column_display_properties">
			<record index="0" left="2"/>
            <record index="1" right="2" />
		</list>
	</widget>

</container>

              <widget class="picture" id="pibx" auto_size="vertical" file="main/news_teambar" cached="true" rhtr="80">
		<layout class="fit_children_attachment" alignment="vertical,fill" gap="0" />
		<layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>			
		<attachment class="get_global_attachment" get_property="bkcl" set_property="colr"/>
	</widget>

	<widget class="picture" id="ssbx" auto_size="vertical" file="main/news_teambar_outline" rhtr="80">
		<layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>	
		<attachment class="get_global_attachment" get_property="fcol" set_property="colr"/>			
	</widget>

	<widget class="picture" auto_size="vertical" file="main/news_teambar_overlay" cached="true">
		<layout class="stick_to_sides_attachment" alignment="vertical" inset="0"/>		
	</widget>

    <widget class="text" id="ssbx" multiline="false" 
           text="Factfile[COMMENT: news item : linked object fact file title]" auto_size="all"  size="10" alignment="centre">
		   <layout class="stick_to_sides_attachment" alignment="top" inset="16"/>
		   <layout class="stick_to_sides_attachment" alignment="left" inset="16"/>
		   <attachment class="get_global_attachment" get_property="fcol" set_property="colr"/>	
       </widget>

</panel>

I have just move titled text in the bottom of panel (text doesn't see because of the images). And add images (into my skin folder too of course). Ah and change class and appearance of box (subsection to titled)..

It's for my future skin klasa..

I tried changing the "id" deleting group_box picture etc.. but not work.. Take me 3 hours lol..

Not : I post in SI Forum because I know Radestock or michaeltmurrayuk can help me.. Ah and sorry for my english I'm French..

Thanks

Link to post
Share on other sites

I'll have a look at this when I get home and get back to you. Should work. One thing to think about, colours will be the team being managed and not the team colours of the badge/player in the news item. So if your managing Chelsea and the news item is about wolves those colours are always going to be blue and White.

Actually, the team you are managing - are their colours red and blue? That could be why you're getting those colours.

Link to post
Share on other sites

Thanks Rade..

My managing team in screenshot is Brazil. And bottom part of extra images should be secondary colour of club. Should work yes because color team work with titled text..

I have founded "id" in screens/team.xml concerning news panel, but not work too.. I'm desperate..

Link to post
Share on other sites

I just tried it myself with the default 'news linked object.xml' file. I added the following right before the closing panel tag </panel>:

<widget class="picture" file="test/kev" auto_size="all" cached="true" rthr="68">
<layout class="stick_to_sides_attachment" alignment="top, left" inset="40"/>
<attachment class="get_global_attachment" get_property="bkcl" set_property="colr"/>
</widget>

kev.png is a 40x40 square I created just to test this out. This works fine. I can change it to "fcol" to get the foreground colour and it's fine.

Really not sure what you've done but as a rule NEVER use the same id on something else, especially if it's an id used by the game. "pibx" for instance is a unique identifier for the group box containing the picture/badge within the news item, it makes no sense to use it for one of your own pictures. In fact you don't 100% need to have an id for things unless you need to reference them.

EDIT: Having tried it, the bkcl and fcol will be the competition colours rather than your club colours as the news screen is news for that competition/league. So the colours for my sunderland game are white/blue, the colours of the premier league. Basically those colours will match the header colours you see on the news screen.

Link to post
Share on other sites

Thanks mate..but..

I don't understant I just tried me too with default 'news linked object.xml' file. I added the following right before the closing panel tag </panel>, like you :

	    <widget class="picture" file="test/teambar" auto_size="all" cached="true" rhtr="68">
		<layout class="stick_to_sides_attachment" alignment="top, left" inset="0"/>			
		<attachment class="get_global_attachment" get_property="fcol" set_property="colr"/>
    </widget>

(tested with "bkcl" too)

So teambar.png is into graphics/test folder of my skin. And don't work with me.. teambar.png appear but it's already red.. What is colour of your kev.png ?

I tried with another skin and don't work too.. I really don't understand...

Link to post
Share on other sites

Really strange not work, tried in other skin not work too, code is the same as your Rade, and my graphics is red like other team color graphics (titlebar etc..)..

Have you an idea please ? I get mad..

Thanks.

Link to post
Share on other sites

Both your codes work for me - I've just taken one of the player dots and copied it into the test folder calling it kev and teambar makes no difference, have you taken out the other coding changes you made (rename the file, copy over the default file and add the above code on its own to see if it works).

If you do get it working you may need to move the coding from the bottom, as there it will appear over the top of the text and logo.

Link to post
Share on other sites

I have always managed to do what I wanted for my skin, but this panel have killed me..

I don't understand I have tried everything don't work.. Please Can you send me your workin' panel and graphics ? I'm really desperate..

Thanks..

Link to post
Share on other sites

download this and unzip into the folder for your skin and it should display the following in the news box:

newsep1.jpg

The white dot will take the background colour of the title - that was white as on the news screen for League One.

Edit the graphic to change its shape and mess around with the xml file to position it where you want.

Link to post
Share on other sites

It works perfectly thank you very much .. :)

Out of curiosity I inserted your code into my default news_linked_object.xml and it didn't work .. Problem is probably this default .xml, although by comparing I see only very few differences (like fit_children.. "vertical" and in mine is fit_children.. "vertical,fill" etc..).. Really strange, my default panel is not same as your..

Great thanks again..

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...