• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

<grid> reverse?

Grokov

New member
Hello all!

I want to remake the buffs window in the HUD.
Make that they would be displayed in a 6x6 grid.
The original code I rewrote under the grid. But faced with the fact that the icons of buffs begin to fill from top to bottom (like any other grid in the game), and I want them to fill from bottom to top.

The question is as follows:
1. Is it possible to reverse using .xml?
2. Is it possible to do it with some add-ons, frameworks or other tools?

7-Days-To-Die-u-Sih9-WQd-AV.jpg


windows.xml

&lt;!-- Remove Buff Panel --&gt;
&lt;remove xpath="/windows//window[@name='HUDLeftStatBars']/rect[@controller='BuffPopoutList']"&gt;&lt;/remove&gt;

&lt;insertafter xpath="/windows//window[@name='HUDLeftStatBars']/rect[@name='hud'][1]"&gt;
&lt;grid name="hud" pos="200,200" side="left" width="120" height="30" controller="BuffPopoutList" pivot="bottomLeft" arrangement="Vertical" reverse_content="true" rows="6" cols="6" repeat_content="false" cell_width="120" cell_height="30" &gt;
&lt;buffPopoutListGrokov /&gt;
&lt;/grid&gt;
&lt;/insertafter&gt;




controls.xml

Code:
&lt;append xpath="/controls"&gt;
	&lt;buffPopoutListGrokov&gt;
			&lt;panel width="120" height="30" name="item" visible="false" pivot="right" disableautobackground="true" pos="-170, -100" style="press" sound="[recipe_click]" on_hover="true" &gt;
				&lt;sprite depth="3" pos="0,0" name="Background" sprite="ui_game_popup" height="30" width="120" pivot="center" flip="Horizontally" color="[red]"/&gt;
				&lt;sprite depth="4" name="Icon" size="25,25" pos="-30,0" pivot="right" color="[transparent]"/&gt;
				&lt;label depth="6" name="TextContent" pos="0,0" font_size="20" color="[white]" justify="center" width="100" height="26" pivot="center"/&gt;
			&lt;/panel&gt;
	&lt;/buffPopoutListGrokov&gt;
&lt;/append&gt;
 
Last edited by a moderator:
Back
Top