Jump to content

Removing panels in Xui causes errors - workaround?


Recommended Posts

Hi All,

 

I hope somebody more experienced with xml can help me out with this problem.

 

I have created a new workbench and I'm trying to remove certain elements which I don't need in order to tidy up the code.

 

For example, in Config/XUi/windows.xml

I have created all new windows for my new workbench, within which I have the following redundant code.

 

<rect depth="2" name="categorySelector" width="400" pos="0,0">
				<grid name="categories" pos="23,-21" rows="1" cols="1" width="400" cell_width="50" cell_height="50" repeat_content="true" controller="CategoryList">
					<category_icon />
				</grid>
			</rect>

			<rect depth="3" name="searchControls" width="400" pos="1200,0">
				<button depth="4" name="favorites" style="icon30px, press" pos="-500,-50" sprite="server_favorite" pivot="center" sound="[paging_click]" tooltip="Favorites" tooltip_key="lblFavorites" collider_scale="1.5" />

				<panel pos="-500,0" width="400" disableautobackground="false">
					<sprite depth="4" name="searchIcon" style="icon30px" pos="25,-22" sprite="ui_game_symbol_search" pivot="center"/>
					<textfield depth="5" name="searchInput" pos="0,-7" width="140" height="30" virtual_keyboard_prompt="vkPromptSearchTerm" search_field="true" close_group_on_tab="true" />
				</panel>

				<panel pos="-500,0" width="400" height="43">
					<pager name="pager" pos="4,-6" />
				</panel>
			</rect>

 

 

By simply removing it I get red errors.

 

So my workaround is to hide it using absolute positioning. BUT this isn't ideal.

 

Is there a way to completely remove it or does it still play a role in the functionality of the workbench?

 

Many Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Can a mod move this thread into the discussions and requests sub-forum? I posted here by mistake.

 

Can anyone offer insight into why certain things can't be removed in windows.xml?

 

As you can see in my code below, my only option is to reduce it as much as possible and hide it off in -900,0 pos. Ideally, I'd like to remove it completely.
 

<panel name="content" depth="1" on_scroll="true" disableautobackground="true">

			<!-- CAN'T REMOVE BUT WANT TO -->
			<rect name="categorySelector" pos="-900,0">
				<grid name="categories" controller="CategoryList">
					<category_icon />
				</grid>
			</rect>

			<!-- CAN'T REMOVE BUT WANT TO -->
			<rect name="searchControls" width="10" height="10" pos="-900,0">
				<button name="favorites" />
				<panel pos="0,0"><sprite name="searchIcon" /></panel>
				<panel pos="0,0"><pager name="pager" /></panel>
			</rect>
			
			<!-- CAN'T REMOVE BUT WANT TO -->
			<rect pos="0,0" width="225" controller="CraftingQueue">
				<grid name="queue" rows="1" cols="4" pos="-900,0" cell_width="75" cell_height="75" repeat_content="true">
					<recipe_stack name="0"/>
				</grid>
			</rect>
			
		</panel>

 

Link to comment
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
×
×
  • Create New...