Jump to content

[FM23] How to change width of column in a widget table


MrGone
 Share

Recommended Posts

I am attempting to add left foot and right foot strength to the additional attributes table in the "Player Attributes Panel" of my "Player Overview Panel." I have successfully added these attributes, however, the text value is cut off by the size of the column and I cannot figure out how to adjust this in the table properties.

I have attached screenshots of the panel in-game and (what I believe are) the relevant lines in the .xml file, along with the .xml file in its entirety.

Any help would be appreciated!

 

In this screenshot, the Right Foot value "Very Strong" being cut off as "Very..." is an example of the issue I'm attempting to solve.

Screenshot_20230217_084714.png

Screenshot_20230217_085233.png

player attributes panel.xml

Edited by MrGone
Provided additional context for the screenshot, explaining the issue
Link to post
Share on other sites

Here's the relevant container on it's own in text form

<!-- Additional attributes table -->
<container class="client_object_viewer_xml_panel" id="attT">
	<layout class="stick_to_sides_attachment" alignment="all" inset="0" apply_to_children="true"/>

	<widget class="table" layout="-1, 80" mode="fill_rows, printable" row_height="22" row_spacing="0">
		<record id="object_property" get_property="objt" set_property="objt" />
		<list id="column_table_properties">
			<record index="0" left="8" sort_disabled="true"/>
			<record index="1" right="8" sort_disabled="true"/>
		</list>

		<!-- Height-->
		<widget class="label" row="0" column="0" >
			<record id="object_property" get_property="Phei" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Phei" row="0" column="1" style="semi_bold">
			<record id="object_property" get_property="Phei"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Weight-->
		<widget class="label" row="1" column="0" >
			<record id="object_property" get_property="Pwei" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Pwei" row="1" column="1" style="semi_bold">
			<record id="object_property" get_property="Pwei"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Preferred Foot
		<widget class="label" row="2" column="0" >
			<record id="object_property" get_property="Pfot" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Pfot" row="2" column="1" style="semi_bold">
			<record id="object_property" get_property="Pfot"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget> -->
		<!-- Left Foot Strength-->
		<widget class="label" row="2" column="0" >
			<translation id="text" translation_id="230000" type="use" value="Left" />
		</widget>
		<widget class="editable_client_object_property_panel" id="fotL" row="2" column="1" style="semi_bold">
			<record id="object_property" get_property="PlfG"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Right Foot Strength-->
		<widget class="label" row="3" column="0" >
			<translation id="text" translation_id="230001" type="use" value="Right" />
		</widget>
		<widget class="editable_client_object_property_panel" id="fotR" row="3" column="1" style="semi_bold">
			<record id="object_property" get_property="PrfG"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>	

 

Link to post
Share on other sites

6 hours ago, MrGone said:

Here's the relevant container on it's own in text form

<!-- Additional attributes table -->
<container class="client_object_viewer_xml_panel" id="attT">
	<layout class="stick_to_sides_attachment" alignment="all" inset="0" apply_to_children="true"/>

	<widget class="table" layout="-1, 80" mode="fill_rows, printable" row_height="22" row_spacing="0">
		<record id="object_property" get_property="objt" set_property="objt" />
		<list id="column_table_properties">
			<record index="0" left="8" sort_disabled="true"/>
			<record index="1" right="8" sort_disabled="true"/>
		</list>

		<!-- Height-->
		<widget class="label" row="0" column="0" >
			<record id="object_property" get_property="Phei" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Phei" row="0" column="1" style="semi_bold">
			<record id="object_property" get_property="Phei"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Weight-->
		<widget class="label" row="1" column="0" >
			<record id="object_property" get_property="Pwei" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Pwei" row="1" column="1" style="semi_bold">
			<record id="object_property" get_property="Pwei"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Preferred Foot
		<widget class="label" row="2" column="0" >
			<record id="object_property" get_property="Pfot" name="true"/>
		</widget>
		<widget class="editable_client_object_property_panel" id="Pfot" row="2" column="1" style="semi_bold">
			<record id="object_property" get_property="Pfot"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget> -->
		<!-- Left Foot Strength-->
		<widget class="label" row="2" column="0" >
			<translation id="text" translation_id="230000" type="use" value="Left" />
		</widget>
		<widget class="editable_client_object_property_panel" id="fotL" row="2" column="1" style="semi_bold">
			<record id="object_property" get_property="PlfG"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>
		<!-- Right Foot Strength-->
		<widget class="label" row="3" column="0" >
			<translation id="text" translation_id="230001" type="use" value="Right" />
		</widget>
		<widget class="editable_client_object_property_panel" id="fotR" row="3" column="1" style="semi_bold">
			<record id="object_property" get_property="PrfG"/>
			<record id="widget_properties" alignment="right,centre_y" />
		</widget>	

 

it's not the attribute file you need to change width in, but the file that contains the space where you've loaded the attributes file into

Link to post
Share on other sites

8 hours ago, MrGone said:

I am attempting to add left foot and right foot strength to the additional attributes table in the "Player Attributes Panel" of my "Player Overview Panel." I have successfully added these attributes, however, the text value is cut off by the size of the column and I cannot figure out how to adjust this in the table properties.

I have attached screenshots of the panel in-game and (what I believe are) the relevant lines in the .xml file, along with the .xml file in its entirety.

Any help would be appreciated!

 

In this screenshot, the Right Foot value "Very Strong" being cut off as "Very..." is an example of the issue I'm attempting to solve.

Screenshot_20230217_084714.png

Screenshot_20230217_085233.png

player attributes panel.xml 15.6 kB · 0 downloads

I love such examples. the screenshot shows two things that I hate in custom skins and I don't understand how the authors can like it.
1. duplication of information (the power of the right and left foot is already indicated at the bottom of the left container)
2. irrational container sizes (the size of the Positions container is 2 times larger than required)

the easiest way to achieve the result you want is to simply solve problem number 2, which will give extra width for the attribute container

Link to post
Share on other sites

4 hours ago, snowofman said:

it's not the attribute file you need to change width in, but the file that contains the space where you've loaded the attributes file into

I'm referring specifically to the highlighted column within the larger attribute table. There has to be a way to adjust the right column width of that 'additional attributes' table on its own, I just don't know how.

Screenshot_20230217_084714.png

Link to post
Share on other sites

1 hour ago, Olas Nick said:

I love such examples. the screenshot shows two things that I hate in custom skins and I don't understand how the authors can like it.
1. duplication of information (the power of the right and left foot is already indicated at the bottom of the left container)
2. irrational container sizes (the size of the Positions container is 2 times larger than required)

the easiest way to achieve the result you want is to simply solve problem number 2, which will give extra width for the attribute container

I mostly want this information here because I use the same attribute table format for my player popup overview, which has the same problem. Individual foot strength is not readily available on that panel, and I would like my attribute tables to be the same in both locations.

Adjusting the size of the left adaptive container is a workaround for this specific page that may work, I'll give that a try and let you know. Unfortunately it won't fix the same problem on my Player Overview Popup panel.

In the meantime, if you know the answer to my question in particular (how to adjust the width of a specific column in a table), rather than unsought criticism towards my personal skin, I would appreciate it.

Edited by MrGone
Link to post
Share on other sites

13 minutes ago, MrGone said:

I mostly want this information here because I use the same attribute table format for my player popup overview, which has the same problem. Individual foot strength is not readily available on that panel, and I would like my attribute tables to be the same in both locations.

Adjusting the size of the left adaptive container is a workaround for this specific page that may work, I'll give that a try and let you know. Unfortunately it won't fix the same problem on my Player Overview Popup panel.

In the meantime, if you know the answer to my question in particular (how to adjust the width of a specific column in a table), rather than unsought criticism towards my personal skin, I would appreciate it.

Try to adjust table layout in line 9 of your xml file.. :)

 

image.png.8783638425bf83e3615048eb8e4a579c.png

 

 

Link to post
Share on other sites

2 hours ago, Olas Nick said:

I love such examples. the screenshot shows two things that I hate in custom skins and I don't understand how the authors can like it.
1. duplication of information (the power of the right and left foot is already indicated at the bottom of the left container)
2. irrational container sizes (the size of the Positions container is 2 times larger than required)

the easiest way to achieve the result you want is to simply solve problem number 2, which will give extra width for the attribute container

Didn't work.

Screenshot_20230218_084758.png

Link to post
Share on other sites

Figured it out. Issue was fairly simple in the end, thought I had to add an attribute to the table, but it turns out the 'layout' attribute that I already had was the culprit.

<widget class="table" layout="-1, 80" mode="fill_rows, printable" row_height="22" row_spacing="0">

layout="-1, 80" means that the right column is constrained to exactly 80 pixels, with the left column filling the rest of the total width. Swapping them to have the right column unrestrained and the left column set to the required length for the longest word (coincidentally 80), fixed the issue.

Screenshot_20230218_090814.png

Link to post
Share on other sites

4 minutes ago, Olas Nick said:

try alignment="left,center_y" instead alignment="right,center_y"

 

I found the solution. The 'layout' element was the culprit. Detailed the fix in a previous post. Thanks for the help, nevertheless.

Not sure I like the new spacing left to right, though, the positions panel feels cramped and the attribute values feel too far away from the attribute names. Empty space is just as important in design as information density.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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