Jump to content

[TUT] GUI's and You - Elements/Design/Positioning/Building/Implementation


DUST2DEATH

Recommended Posts

how big is whatever you are working on?

 

You gain a significant gap between the top of the toolbelt and the bottom of the text at 1.000, but yes, everything scales.

Otherwise the only way to achieve what you want is to edit the dll.

 

Ok, thx for the help. I have barely learned how to edit a dll file, and just some basics, so might not do that yet.. But what dll would that be, incase I wanna try? Not working on anything in specific now. Just using your ui with the Valmod fix. And btw, the Valmod combine window dont work with your valmod fix. I had to change the rect under Windowcombine from workbenchposition to Combineposition in the windows.xml file. the labels are not there sill tho, but I didnt bother looking into that.Pretty busy working on getting a few mods merged into Valmods pack, and going to try and make a pack based around war of the walkers, both to just run on my server, so as long as the combinewindow works I am happy for now. Will look into the labels later. I do plan on making a ui or tweaking your ui tho, if I get permission from you to do that. Just for use on my server unless the changes are something someone else wants aswell. I would like to get the crafting/skills and such window a bit larger and a bit longer, and some rearranging of some bits of info. Also the info window that shows what you get from eating different types of food and such is a bit small for my liking, makes the text too tiny. Would like to not have to hover over it to read it :) So maybe making the entire top part of the main windows higher up to fix both things in one go. Thats why I was hoping I could just move that text I first asked about upwards, so I could fix most of it by scaling alone ;) Even at your ui's default scaling that text is partly obscured, so I might move the healthbars and stuff around a bit aswell. Never done any of this before, so its all a learning experience, but having fun tho :)

Link to comment
Share on other sites

Hi I was hoping you could help me with a couple of questions I have.

 

I currently have food/water bars to the right of my health/stamina which I like; however, I would like to have just the sprite with a % instead of an entire bar. Would you be able to kind of point me in the right direction of doing so?

 

I would also like to have some similar sprites like elevation and map coordinates at the top near the compass. Would this be as simple as copying the code for the health/stamina making changes to loose the bars and use the appropriate calls for things like elevation and then finding and inputting the right coordinates?

 

Love your work, Thanks

 

for the first question all you are after is the icon sprite and the label.

eg:

<!-- Water -->
<rect width="150" height="20" controller="HUDStatBar" stat_type="Water" visible="{statvisible}">
<sprite depth="5" name="Icon" sprite="ui_game_symbol_water" size="18,18" pos="5,-1" foregroundlayer="true" color="[white]"/>
<label depth="6" name="TextContent" pos="0,-1" font_size="18" color="[white]" justify="center" pivot="topleft" text="{playerwater} %" height="18" controller="PlayerStatsWindow" />
</rect>

 

for the elevation and map co-ords you need to look at the map controller code.

Some of this code must be kept, but you must push it offscreen.

eg:

<rect name="positioncoords" controller="MapArea">
			<panel name="content" depth="10" pos="0,0" height="30" disableautobackground="true">
				<rect depth="10" name="toolbar" width="300" height="43" pos="0,0">	
					<button depth="1" name="playerIcon" style="icon32px, press, hover" pivot="center" pos="9999,9999" sprite="ui_game_symbol_map_player_arrow" tooltip="Center on Player" tooltip_key="lblCenterOnPlayer" sound="[paging_click]" />
					<label depth="10" name="playerPos" pos="40,-24" width="215" height="28" text="110 S 769 W" font_size="26" justify="center" effect="outline"/>

					<button depth="1" name="bedrollIcon" style="icon32px, press, hover" pivot="center" pos="9999,9999" sprite="ui_game_symbol_map_bed" tooltip="Center on Sleeping Bag" tooltip_key="lblCenterOnSleepingBag" sound="[paging_click]" />
					<label depth="1" name="bedrollPos" pos="9999,9999" width="160" height="28" text="300 N 832 W" font_size="26"/>

					<sprite depth="1" name="cursorIcon" style="icon32px, press, hover" pos="9999,9999" sprite="ui_game_symbol_map_cursor" tooltip="Cursor Position" tooltip_key="lblCursorPosition" sound="[paging_click]"/>
					<label depth="1" name="cursorPos" pos="9999,9999" width="160" height="28" text="300 N 832 W" font_size="26"/>

					<button depth="1" name="waypointIcon" style="icon32px, hover" pivot="center" on_press="true" pos="9999,9999" sprite="ui_game_symbol_map_waypoint_remove" tooltip="Remove Quick Waypoint" tooltip_key="lblRemoveQuickWaypoint" />
					<label depth="1" name="waypointDistance" pos="9999,9999" width="122" height="28" text="0.2 KILOMETERS" font_size="26"/>			
				</rect>
				<panel name="mapView" depth="1" width="712" height="712" pos="9999,9999" disableautobackground="true" on_drag="true" style="press, scroll, hover" sound="[craft_click]" >
					<texture depth="2" name="mapViewTexture" width="712" height="712" pos="0,0" material="Materials/MaskableMainmap"/>				
					<panel name="clippingPanel" depth="1" width="712" height="712" pos="0,0" disableautobackground="true" />
				</panel>
			</panel>
		</rect>

 

All of the above code is just to get the player pos on screen, with a single grey background sprite, nothing more.

The elevation code is part of the mapstats controller, in the same general area but with this one we can apply the controller directly to the required label, so code is short and neat

 

<!-- Elevation -->
		<rect width="117" height="30">
			<sprite depth="3" name="elevIcon" width="24" height="24" pos="0,-1" sprite="ui_game_symbol_climb" color="[white]" foregroundlayer="true"/>
			<label depth="4" name="elevLabel" pos="0,0" width="117" height="30" text="{mapelevation} M[-]" font_size="26" effect="outline" upper_case="true" justify="center" color="[white]" controller="MapStats"/>
		</rect>

 

That should get you close enough.

Link to comment
Share on other sites

Ok, thx for the help. I have barely learned how to edit a dll file, and just some basics, so might not do that yet.. But what dll would that be, incase I wanna try? Not working on anything in specific now. Just using your ui with the Valmod fix.

 

And btw, the Valmod combine window dont work with your valmod fix. I had to change the rect under Windowcombine from workbenchposition to Combineposition in the windows.xml file. the labels are not there sill tho, but I didnt bother looking into that.

 

Pretty busy working on getting a few mods merged into Valmods pack, and going to try and make a pack based around war of the walkers, both to just run on my server, so as long as the combinewindow works I am happy for now. Will look into the labels later. I do plan on making a ui or tweaking your ui tho, if I get permission from you to do that. Just for use on my server unless the changes are something someone else wants aswell. I would like to get the crafting/skills and such window a bit larger and a bit longer, and some rearranging of some bits of info. Also the info window that shows what you get from eating different types of food and such is a bit small for my liking, makes the text too tiny. Would like to not have to hover over it to read it :) So maybe making the entire top part of the main windows higher up to fix both things in one go. Thats why I was hoping I could just move that text I first asked about upwards, so I could fix most of it by scaling alone ;) Even at your ui's default scaling that text is partly obscured, so I might move the healthbars and stuff around a bit aswell. Never done any of this before, so its all a learning experience, but having fun tho :)

 

Assembly-Csharp.dll is the file.

 

Valmod removes the combine function from the workstation and locks it behind its own workstation and skill set. So the workbench doesnt have it (this is normal).

 

You can do what you like with my UI's. Go for it.

Zompact is a compact UI intended to allow the larger storage mods without having to deal with moving windows.

 

If you want to pull everything up the screen, apply the larger backpack patch. It will pull everything up the screen by 100px. (apart from said text which is hardcoded).

Link to comment
Share on other sites

Thx alot, that should help :) Yeah I noticed that about the combine function. But in your valmod fix in your download its still workbenchposition and not combineposition. So your fix is partly broken atm ;)

Thx for permission to tweak some of it, highly appreciated :)

 

I think Im misunderstanding something.

 

in xui.xml

<window_group name="workstation_workstationCombine" controller="XUiC_WorkstationWindowGroup">
		<window name="windowCraftingList"/>
		<window name="craftingInfoPanel"/>
		<window name="windowNonPagingHeader" />
		<window name="windowCombine" />
		<window name="HUDClothing" /><!-- Equipped Clothing //D2D -->
	</window_group>	

 

windows.xml

<!-- Combine Window Start -->
<window name="windowCombine" width="400" height="0" panel="Center">
<rect name="workbenchposition" pos="710,0">
	<sprite depth="1" name="backgroundMain" pos="0,0" width="200" height="250" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<sprite depth="1" name="backgroundMainoutput" pos="-130,-255" width="300" height="50" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<texture depth="2" name="zompactItemBackground" size="200,250" texture="[zompact_workbench]" material="Materials/Transparent Colored" pos="0,0" />
	<!-- Labels and Icons -->
	<sprite size="20,20" pos="1,-1" sprite="ui_game_symbol_add" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="65,-85" text="COMBINE" text_key="xuiCombine" color="[zompact_itemheadertext]"/>
	<!-- Combine Grid -->
	<rect pos="0, -85" height="230" width="228" controller="CombineGrid">	
		<grid name="parts" rows="1" cols="3" pos="5,-38" cell_width="60" cell_height="60" repeat_content="true" >
			<required_item_stack />
		</grid>
		<label depth="3" pos="5,-15" text="Item A" text_key="xuiCombineItemA" font_size="22"/>
		<label depth="3" pos="65,-15" text="Item B" text_key="xuiCombineItemB" font_size="22"/>
		<label depth="3" pos="125,-15" text="Result" text_key="xuiResult" font_size="22"/>
	</rect>
</rect>
</window>
<!-- Combine Window End -->

 

workbenchposition is just a positioning container. its name has no effect on anything. absolutely irrelevent.

Are you implying when you use the combine station that the combine window isnt loading?

Link to comment
Share on other sites

Nope. The combinewindow still opens with the workbench, but it didnt before I changed <rect name="workbenchposition" to combineposition.

Either that or I must have been completely blind, which is abolutely a possibility..

 

Sounds like it wasnt patched properly. The workstation doesnt call the combine window in valmod patch

 

<window_group name="workstation_workbench" controller="XUiC_WorkstationWindowGroup">
		<window name="windowCraftingList"/>
		<window name="craftingInfoPanel"/>
		<window name="windowCraftingQueue"/>
		<window name="windowWorkbench"/><!-- Workbench //D2D -->
		<window name="windowNonPagingHeader" />
		<window name="HUDClothing" /><!-- Equipped Clothing //D2D -->
	</window_group>	

 

https://github.com/DUST2DEATH/Zompact-UI-Overhaul/blob/master/Patches/Valmod%20Overhaul/Data/Config/xui.xml

 

<!-- Workbench Window Start -->
<window name="windowWorkbench" width="400" height="0" panel="Center">
<rect name="workbenchposition" pos="710,0">
	<sprite depth="1" name="backgroundMain" pos="0,0" width="200" height="250" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<sprite depth="1" name="backgroundMainoutput" pos="-130,-255" width="300" height="50" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<texture depth="2" name="zompactItemBackground" size="200,250" texture="[zompact_workbench]" material="Materials/Transparent Colored" pos="0,0" />
	<!-- Labels and Icons -->
	<sprite size="20,20" pos="65,-1" sprite="ui_game_symbol_wrench" depth="5" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="6" pos="90,-1" text="TOOLS" text_key="xuiTools" color="[zompact_itemheadertext]"/>
	<sprite size="20,20" pos="15,-205" sprite="ui_game_symbol_loot_sack" depth="5" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="5,-225" text="OUTPUT" text_key="xuiOutput" color="[zompact_itemheadertext]"/>
	<!-- Required Tools -->
	<rect name="[color="#FFFF00"]contentTools[/color]" depth="6" pos="5,-22" height="60" disablefallthrough="true" on_press="true">
		<grid name="inventory" rows="1" cols="3" pos="0,0" cell_width="60" cell_height="60" controller="WorkstationToolGrid" repeat_content="true" allow_sort_order="false" required_tools="handSaw,weldingTorch,paperRack" required_tools_only="true">
			<required_item_stack name="0"/>
		</grid>		
	</rect>	
<!-- Output -->
<rect name="[color="#FFFF00"]contentOutput[/color]" depth="0" pos="-130,-255" height="50" disablefallthrough="true" on_press="true">
	<sprite depth="2" name="backgroundMain" sprite="menu_empty3px" height="50" color="0,0,0,1" type="sliced" fillcenter="false" on_press="true" />	
		<grid name="inventory" rows="1" cols="6" pos="0,0" cell_width="50" cell_height="50" controller="WorkstationOutputGrid" repeat_content="true">
			<output_stack name="0"/>
		</grid>
</rect>
</rect>
</window>
<!-- Workbench Window End -->

 

https://github.com/DUST2DEATH/Zompact-UI-Overhaul/blob/master/Patches/Valmod%20Overhaul/Data/Config/XUi/windows.xml

Link to comment
Share on other sites

I just doublechecked. Turns out I was both wrong and right. The code I mentioned was not the issue. But there was an issue, turns out I forgot I added <window name="windowCombine" /> under the workbench window. Actually in that part of code you just pasted. As its not a separate bench still, it opens with the workbench. If its supposed to or not, I dunno, but thats what happens :) Under the part where you put the tools in the workbench, there's supposed to be 3 slots. Thats the combinestation. I jsut started up the game and server with your valmod ui patch, and no combine. With that code added, it appears :)

I am using Valmod Expansion btw, not Valmod overhaul.

Link to comment
Share on other sites

Now I tried without the big backpack version, and you windows.xml from valmodpatch, without editing the workbenchposition. But I added the previous mentioned line in xui.xml and bot the slots for tools and the slots for combine are where they should be. Just no labels for combine. So after doing some confusing, it seems like that is the issue.

 

<window_group name="workstation_workbench" controller="XUiC_WorkstationWindowGroup">
		<window name="windowCraftingList"/>
		<window name="craftingInfoPanel"/>
		<window name="windowCraftingQueue"/>
		<window name="windowWorkbench"/><!-- Workbench //D2D -->
		<window name="windowNonPagingHeader" />
		<window name="HUDClothing" /><!-- Equipped Clothing //D2D -->
		<window name="windowCombine" />
	</window_group>	

 

So Iam sorry for all the confusing, should done better testing first. But atleast I am pretty sure I did find the bug at last :)

Link to comment
Share on other sites

no bug.

 

overwriting patches with different combinations not intended.

Bigger backpack patch is intended not to be used with valmod patch.

Valmar supplies his own backpack dll, use that, and edit the grids in styles.xml.

 

combine station and combine window are only removed in valmod patches.

There is no reason to add the combine back to the workbench in valmod, unlock combine station skill instead.

 

 

default zompact workstation looks like:

 

<!-- Workbench Window Start -->
<window name="windowWorkbench" width="400" height="0" panel="Center">
<rect name="workbenchposition" pos="710,0">
	<sprite depth="1" name="backgroundMain" pos="0,0" width="200" height="250" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<sprite depth="1" name="backgroundMainoutput" pos="-130,-255" width="300" height="50" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<texture depth="2" name="zompactItemBackground" size="200,250" texture="[zompact_workbench]" material="Materials/Transparent Colored" pos="0,0" />
	<!-- Labels and Icons -->
	<sprite size="20,20" pos="15,-205" sprite="ui_game_symbol_loot_sack" depth="5" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="5,-225" text="OUTPUT" text_key="xuiOutput" color="[zompact_itemheadertext]"/>
	<sprite size="20,20" pos="1,-1" sprite="ui_game_symbol_add" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="25,-1" text="[color="#FFFF00"]COMBINE[/color]" text_key="xuiCombine" color="[zompact_itemheadertext]"/>
	[color="#FFFF00"]<!-- Combine Grid -->
	<rect pos="0, -23" height="230" width="228" controller="CombineGrid">	
		<grid name="parts" rows="1" cols="3" pos="5,-38" cell_width="60" cell_height="60" repeat_content="true" >
			<required_item_stack />
		</grid>
		<label depth="3" pos="5,-15" text="Item A" text_key="xuiCombineItemA" font_size="22"/>
		<label depth="3" pos="65,-15" text="Item B" text_key="xuiCombineItemB" font_size="22"/>
		<label depth="3" pos="125,-15" text="Result" text_key="xuiResult" font_size="22"/>
	</rect>[/color]
<!-- Output -->
<rect name="contentOutput" depth="0" pos="-130,-255" height="50" disablefallthrough="true" on_press="true">
	<sprite depth="2" name="backgroundMain" sprite="menu_empty3px" height="50" color="0,0,0,1" type="sliced" fillcenter="false" on_press="true" />	
		<grid name="inventory" rows="1" cols="6" pos="0,0" cell_width="50" cell_height="50" controller="WorkstationOutputGrid" repeat_content="true">
			<output_stack name="0"/>
		</grid>
</rect>
</rect>
</window>
<!-- Workbench Window End -->

Link to comment
Share on other sites

i wanted to post this here

 

its a really good reference also

 

Everything is Relative.

Positioning is all relative.

pos="1,2".

 

1 is horizontal. negative value moves left, positive value moves right.

2 is vertical. negative value moves down, positive value moves up.

 

 

 

first you have the anchor points.

 

CenterBottom,CenterTop,LeftTop,Left,LeftBottom,Rig htTop,Right,Rightbottom.

This defines the "Starting" location (if you will), starting point is always 0,0 of the anchor location.

 

In the case of the toolbelt, to have it centered properly, it needs to be moved left so that the first 4 item slots are before 0,0 (pos -240,x)

 

Following this, you will then have a container (often a rect or panel). The position that you set this container to is relative to the parent positioning.

in the image above, the container (green) would be set to pos="20,-20". its positioning is relative to the main window. (grey) top left corner. (that's the green containers 0,0)

 

After that you have any items/labels etc. All their positioning is relative to the green container. 0,0 is top left corner of green box for an item nested within.

 

Once you understand that, then comes the pivots.

 

If you see an item that has (pivot="center") it means that it will pin said item (usually a icon) to the center point of the container. If a pivot is used, positioning is still relative to the container, but you must specify the pin point of the container.

 

Using the toolbelt as an example, it has a 60x60 container for the toolbelt slot.

the icons, use pivot center so their position = [pos=30,-30"] as this is the center point of the container 60wx60h.

 

TLDR: everything is relative to the parent.

Link to comment
Share on other sites

for the first question all you are after is the icon sprite and the label.

eg:

<!-- Water -->
<rect width="150" height="20" controller="HUDStatBar" stat_type="Water" visible="{statvisible}">
<sprite depth="5" name="Icon" sprite="ui_game_symbol_water" size="18,18" pos="5,-1" foregroundlayer="true" color="[white]"/>
<label depth="6" name="TextContent" pos="0,-1" font_size="18" color="[white]" justify="center" pivot="topleft" text="{playerwater} %" height="18" controller="PlayerStatsWindow" />
</rect>

 

Thank you for your help. I mostly copied what you gave me and moved some stuff around to my liking. But I am having a slight issue with placement I hope you can shed some light for me.

 

After implementing the code, my health/stamina bars seemed to be 2 columns too high and my food/water/temperature was about 2 columns too low. I was able to guestimate the position and fix the health/stamina and I am sure I can do the same with the food/water/temp sprites but I am wondering if you have a moment if you could look at that porition of my xml and see if maybe something stands out to you? I will have to apologize ahead of time I am not the tidiest person when it comes to code.

<windows>

<window name="HUDLeftStatBars">
	<grid name="hud" pos="2,100" rows="2" cols="1" width="168" cell_width="168" cell_height="46" repeat_content="false" side="left" >

		<rect width="168" height="43" controller="HUDStatBar" stat_type="Stamina" visible="{statvisible}">
			<sprite depth="1" name="border" color="0,0,153,255" height="43" type="sliced"/>
			<sprite depth="2" pos="3,-3"  name="background" height="37" width="162" color="0,102,255,255" type="sliced" />
			<sprite depth="3" pos="3,-3"  name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="162" fill="0"  />
			<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/>
			<label depth="6" name="TextContent" pos="0,-8" font_size="28" color="[white]" justify="center" pivot="topleft" text="{statcurrentwithmax}" height="30"/>
		</rect>

<!--
		<rect width="168" height="43" controller="HUDStatBar" stat_type="Food" visible="{StatVisible}">
			<sprite depth="1" name="border" color="32,32,32,255" height="43" type="sliced" />
			<sprite depth="2" pos="3,-3"  name="background" height="37" width="162" color="64,64,64,100" type="sliced" />
			<sprite depth="3" pos="3,-3"  name="BarContent" color="50,205,50,100" type="filled" height="37" width="162" fill="{StatFill}" /> 
			<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/>
			<label depth="6" name="TextContent" pos="0,-10" font_size="28" color="[beige]" justify="center" pivot="topleft" text="{statcurrentwithmax} %" height="30"/>
		</rect> -->

		<rect width="168" height="43" controller="HUDStatBar" stat_type="Health" visible="{statvisible}">
			<sprite depth="1" name="border" color="153,0,0,255" height="43" type="sliced" />
			<sprite depth="2" pos="3,-3"  name="background" height="37" width="162" color="64,64,64,100" type="sliced" />
			<sprite depth="3" pos="3,-3"  name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="162" fill="0" />
			<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/>
			<label depth="6" name="TextContent" pos="0,-8" font_size="28" color="[white]" justify="center" pivot="topleft" text="{statcurrentwithmax}" height="30"/>
		</rect>

<!--	<rect width="168" height="43" controller="HUDStatBar" stat_type="Water" visible="{StatVisible}">
			<sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced" />
			<sprite depth="2" pos="3,-3"  name="background" height="37" width="162" color="64,64,64,100" type="sliced" />
			<sprite depth="3" pos="3,-3"  name="BarContent"  color="0,180,180,100" type="filled" height="37" width="162" fill="{StatFill}" /> 
			<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/> 
			<label depth="6" name="TextContent" pos="0,-10" font_size="28" color="[beige]" justify="center" pivot="topleft" text="{statcurrentwithmax}" height="30"/>
		</rect> -->
		</grid> 

<!--This <grid> element adds the temperature guage to the right of the other stat bars, in it's own seperate table-->
	<grid name="hud" pos="187,100" rows="3" cols="1" width="168" cell_width="168" cell_height="20" repeat_content="false" controller="InGameHUD" side="left" >
		<rect width="168" height="43" controller="PlayerStatsWindow">
			<!-- <sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced"/>
			<sprite depth="2" pos="3,-3"  name="background" height="37" width="162" color="64,64,64,100" type="sliced"/>
			<sprite depth="3" pos="3,-3"  color="50,50,50" type="filled" height="37" width="162" fill="100" /> -->
			<sprite depth="4" name="Icon" sprite="ui_game_symbol_temperature" size="28,28" pos="6,6" foregroundlayer="true"/>
			<label depth="6" name="TextContent" pos="0,-10" font_size="24" color="[white]" justify="center" pivot="topleft" text="{playercoretemp}" height="30" />
<!-- Food--></rect>
		<rect width="150" height="43" controller="HUDStatBar" stat_type="Food" visible="{statvisible}">
			<sprite depth="5" name="Icon" sprite="ui_game_symbol_fork" size="18,18" pos="3,2" foregroundlayer="true" color="[white]"/>
				<label depth="6" name="TextContent" pos="0,-1" font_size="18" color="[white]" justify="center" pivot="topleft" text="{playerfood} %" height="18" controller="PlayerStatsWindow" />
		</rect>
<!-- Water -->
		<rect width="150" height="43" controller="HUDStatBar" stat_type="Water" visible="{statvisible}">
			<sprite depth="5" name="Icon" sprite="ui_game_symbol_water" size="18,18" pos="3,0" foregroundlayer="true" color="[white]"/>
				<label depth="6" name="TextContent" pos="0,-1" font_size="18" color="[white]" justify="center" pivot="topleft" text="{playerwater} %" height="18" controller="PlayerStatsWindow" />
		</rect>
	</grid>

<!-- Elevation -->
	<grid>
		<rect width="117" height="230">
			<sprite depth="3" name="elevIcon" width="24" height="24" pos="0,-1" sprite="ui_game_symbol_climb" color="[white]" foregroundlayer="true"/>
			<label depth="4" name="elevLabel" pos="0,0" width="117" height="30" text="{mapelevation} M[-]" font_size="26" effect="outline" upper_case="true" justify="center" color="[white]" controller="MapStats"/>
		</rect>

<!-- Coordinates-->
		<rect name="positioncoords" controller="MapArea">
			<panel name="content" depth="10" pos="100,100" height="30" disableautobackground="true">
				<rect depth="10" name="toolbar" width="300" height="43" pos="0,0">	
					<button depth="1" name="playerIcon" style="icon32px, press, hover" pivot="center" pos="9999,9999" sprite="ui_game_symbol_map_player_arrow" tooltip="Center on Player" tooltip_key="lblCenterOnPlayer" sound="[paging_click]" />
					<label depth="10" name="playerPos" pos="40,-24" width="215" height="28" text="110 S 769 W" font_size="26" justify="center" effect="outline"/>

					<button depth="1" name="bedrollIcon" style="icon32px, press, hover" pivot="center" pos="9999,9999" sprite="ui_game_symbol_map_bed" tooltip="Center on Sleeping Bag" tooltip_key="lblCenterOnSleepingBag" sound="[paging_click]" />
					<label depth="1" name="bedrollPos" pos="9999,9999" width="160" height="28" text="300 N 832 W" font_size="26"/>

					<sprite depth="1" name="cursorIcon" style="icon32px, press, hover" pos="9999,9999" sprite="ui_game_symbol_map_cursor" tooltip="Cursor Position" tooltip_key="lblCursorPosition" sound="[paging_click]"/>
					<label depth="1" name="cursorPos" pos="9999,9999" width="160" height="28" text="300 N 832 W" font_size="26"/>

					<button depth="1" name="waypointIcon" style="icon32px, hover" pivot="center" on_press="true" pos="9999,9999" sprite="ui_game_symbol_map_waypoint_remove" tooltip="Remove Quick Waypoint" tooltip_key="lblRemoveQuickWaypoint" />
					<label depth="1" name="waypointDistance" pos="9999,9999" width="122" height="28" text="0.2 KILOMETERS" font_size="26"/>			
				</rect>
				<panel name="mapView" depth="1" width="712" height="712" pos="9999,9999" disableautobackground="true" on_drag="true" style="press, scroll, hover" sound="[craft_click]" >
					<texture depth="2" name="mapViewTexture" width="712" height="712" pos="0,0" material="Materials/MaskableMainmap"/>				
					<panel name="clippingPanel" depth="1" width="712" height="712" pos="0,0" disableautobackground="true" />
				</panel>
			</panel>
		</rect>
			</grid>

 

I am having issues uploading a picture but I put it on imgur. http://i.imgur.com/k11AW8h.png

 

Thanks for your help.

Link to comment
Share on other sites

no bug.

 

overwriting patches with different combinations not intended.

Bigger backpack patch is intended not to be used with valmod patch.

Valmar supplies his own backpack dll, use that, and edit the grids in styles.xml.

 

combine station and combine window are only removed in valmod patches.

There is no reason to add the combine back to the workbench in valmod, unlock combine station skill instead.

 

 

default zompact workstation looks like:

 

<!-- Workbench Window Start -->
<window name="windowWorkbench" width="400" height="0" panel="Center">
<rect name="workbenchposition" pos="710,0">
	<sprite depth="1" name="backgroundMain" pos="0,0" width="200" height="250" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<sprite depth="1" name="backgroundMainoutput" pos="-130,-255" width="300" height="50" color="[zompact_flatthemecolor]" type="sliced" fillcenter="true" globalopacitymod="2" />
	<texture depth="2" name="zompactItemBackground" size="200,250" texture="[zompact_workbench]" material="Materials/Transparent Colored" pos="0,0" />
	<!-- Labels and Icons -->
	<sprite size="20,20" pos="15,-205" sprite="ui_game_symbol_loot_sack" depth="5" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="5,-225" text="OUTPUT" text_key="xuiOutput" color="[zompact_itemheadertext]"/>
	<sprite size="20,20" pos="1,-1" sprite="ui_game_symbol_add" color="[zompact_itemwindowicons]"/>
	<label height="23" font_size="22" depth="2" pos="25,-1" text="[color="#FFFF00"]COMBINE[/color]" text_key="xuiCombine" color="[zompact_itemheadertext]"/>
	[color="#FFFF00"]<!-- Combine Grid -->
	<rect pos="0, -23" height="230" width="228" controller="CombineGrid">	
		<grid name="parts" rows="1" cols="3" pos="5,-38" cell_width="60" cell_height="60" repeat_content="true" >
			<required_item_stack />
		</grid>
		<label depth="3" pos="5,-15" text="Item A" text_key="xuiCombineItemA" font_size="22"/>
		<label depth="3" pos="65,-15" text="Item B" text_key="xuiCombineItemB" font_size="22"/>
		<label depth="3" pos="125,-15" text="Result" text_key="xuiResult" font_size="22"/>
	</rect>[/color]
<!-- Output -->
<rect name="contentOutput" depth="0" pos="-130,-255" height="50" disablefallthrough="true" on_press="true">
	<sprite depth="2" name="backgroundMain" sprite="menu_empty3px" height="50" color="0,0,0,1" type="sliced" fillcenter="false" on_press="true" />	
		<grid name="inventory" rows="1" cols="6" pos="0,0" cell_width="50" cell_height="50" controller="WorkstationOutputGrid" repeat_content="true">
			<output_stack name="0"/>
		</grid>
</rect>
</rect>
</window>
<!-- Workbench Window End -->

 

I did not know you could make a combinestation to be honest, with the ui that comes with Valmars mod it just shows up in the workbenchwindow without making any new stations. So I just assumed that was the way it was intended to be. A bit odd that the included ui dont need an extra station tho, if that is the intended way to do it. So, yeah, sorry to have bothered you with that for no apparent reason. Now to go through the dll to find where I adjust that text that just have to hide behind the top of the toolbelt in your ui.

Thx for being patient tho :)

Link to comment
Share on other sites

After reading this last post, and going back and re-reading your others I missed a vital piece of information that you had provided.

 

I am using Valmod Expansion btw, not Valmod overhaul.

 

The patch is for overhaul, not expansion.

 

Now it makes sense, and that yes, in that instance, it wasnt as you expected and you fixed it. (thus a bug from your perspective)

I apologize for missing that and adding to the mounting confusion.

 

I can add an expansion patch as well so that this doesnt happen in future.

Sorry again for missing that key bit of information. :)

Link to comment
Share on other sites

No need to apologize :) I re-read a few posts back aswell, and noticed I somehow didnt coonect the dots here, but you did tell me it was a separate thing alread ;)

 

Valmod removes the combine function from the workstation and locks it behind its own workstation and skill set. So the workbench doesnt have it (this is normal).
Link to comment
Share on other sites

*snip*

 

I am having issues uploading a picture but I put it on imgur. http://i.imgur.com/k11AW8h.png

 

Thanks for your help.

 

Firstly, sorry for the delay I didnt see your post due to the mod queue.

 

After a look at your image and code you need to add positioning to the elevation/player coords grid.

 

<!-- Elevation -->
	<grid [color="#FFFF00"]pos="1,2"[/color]>

 

Move it so its not sitting on top of the food/water grid.

 

- - - Updated - - -

 

Great stuff with this tut! I found it after I played around with the UI to move stuff around.

Wish I found this before hand, but still a good resource to come back to!

 

Thanks :)

Link to comment
Share on other sites

Firstly, sorry for the delay I didnt see your post due to the mod queue.

 

After a look at your image and code you need to add positioning to the elevation/player coords grid.

 

<!-- Elevation -->
	<grid [color="#FFFF00"]pos="1,2"[/color]>

 

Move it so its not sitting on top of the food/water grid.

 

- - - Updated - - -

 

 

 

Thanks :)

 

Thanks for your help!

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

Does anyone happen to know how to remove a sprite using xpath? I'm currently trying to remove the date and time from the top of the screen, but it is in the same window as the compass, which I would like to remain there. So I just want to remove the sprite. Is that possible?

Link to comment
Share on other sites

This is the code to put it in, so just "un-code" it... lol

 

[size=1]<!-- time/date temp wind elev under compass -->
<!-- <insertAfter xpath="/windows/window[@name='windowCompass']/texture[@name='compassTexture']" >
<rect name="rect_compassStats" pos="0,-5">
<sprite name="sprite_compassStatsBackground" depth="0" pos="48,-39"  width="384" height="24" type="sliced" fillcenter="false"  color="0,0,0,100" sprite="ui_game_header_fill" />
<[color=#ffd700]sprite name="sprite_compassClock[/color]" depth="2" pos="50,-41"  size="20,20" sprite="ui_game_symbol_clock" color="*"  foregroundlayer="true"/>
<label name="label_compassDayTime" depth="2" pos="70,-40" width="172"  height="24" text=" [FFFFFF]{day|always} {time|always}[-]"  font_size="22" effect="outline" />
<rect name="rect_compassMapStats" pos="40,-40" width="400" height="32" controller="MapStats" anchor="CenterTop">
<[color=#ffd700]sprite name="sprite_compassTemp[/color]" depth="2" pos="122,-1" size="20,20"  sprite="ui_game_symbol_temperature" color="*"  foregroundlayer="true"/>
<label name="label_compassTemp" depth="2" pos="142,0" width="172"  height="24" text=" [FFFFFF]{maptemperature}[-]" font_size="22"  effect="outline" />
<[color=#ffd700]sprite name="sprite_compassWind[/color]" depth="2" pos="212,-1" size="20,20"  sprite="ui_game_symbol_wind" color="*" foregroundlayer="true"/>
<label name="label_compassWind" depth="2" pos="232,0" width="172"  height="24" text=" [FFFFFF]{mapwind} MPH[-]" font_size="22"  effect="outline" />
<[color=#ffd700]sprite name="sprite_compassElevaytion[/color]" depth="2" pos="302,-1"  size="20,20" sprite="ui_game_symbol_climb" color="*"  foregroundlayer="true"/>
<label name="label_compassElevation" depth="2" pos="322,0"  width="172" height="24" text=" [FFFFFF]{mapelevation} M[-]"  font_size="22" effect="outline" />
</rect>
</rect>
</insertAfter> -->[/size]

Link to comment
Share on other sites

Forgive me, but I am super new at this....

 

This is what I am seeing...

 

<window name="windowCompass" style="compass.window" controller="CompassWindow">

<sprite style="compass.window.background.border"/>

<sprite style="compass.window.background"/>

 

<sprite style="compass.window.compass.background">

 

 

</sprite>

<texture style="compass.window.compass.texture" name="compassTexture" rect_size="0.25,1" rect_offset=".8,0" >

 

</texture>

<sprite pos="240,-60" sprite="" color="255,255,255,255" globalopacitymod="1.8">

<label depth="2" width="300" height="30" text="{daytitle}: [{daycolor|always}]{day|always}[-] {timetitle}: {time|always}" font_size="28" pivot="center" effect="outline" upper_case="true" justify="center"/>

</sprite>

</window>

 

if you could dumb it down for me a bit?

1267279132_TimeandDay.jpg.8b096bc57851c39e81efdf94827df36c.jpg

Link to comment
Share on other sites

Comment out the label.

 

<window name="windowCompass" style="compass.window" controller="CompassWindow">
<sprite style="compass.window.background.border"/>
<sprite style="compass.window.background"/>

<sprite style="compass.window.compass.background">


</sprite>
<texture style="compass.window.compass.texture" name="compassTexture" rect_size="0.25,1" rect_offset=".8,0" >

</texture>
<sprite pos="240,-60" sprite="" color="255,255,255,255" globalopacitymod="1.8">
[color="#FFFF00"]<!-- [/color]<label depth="2" width="300" height="30" text="{daytitle}: [{daycolor|always}]{day|always}[-] {timetitle}: {time|always}" font_size="28" pivot="center" effect="outline" upper_case="true" justify="center"/>[color="#FFFF00"] -->[/color]
</sprite>
</window>

 

If the game has a fit because label is required just move it offscreen.

<label depth="2" [color="#FFFF00"]pos="9999,9999"[/color] width="300" height="30" text="{daytitle}: [{daycolor|always}]{day|always}[-] {timetitle}: {time|always}" font_size="28" pivot="center" effect="outline" upper_case="true" justify="center"/>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...