Upgrading a UI to use /social

General stuff about WAR or any other games we play. Post and say hi!

Moderators: Fingoniel, Stranglehold Moderators

Post Reply
Fingoniel
Brugs Broodje
Posts: 8916
Joined: Wed Mar 20, 2002 12:00 am
Location: Swindon
Contact:

Upgrading a UI to use /social

Post by Fingoniel »

If you have a custom UI that's got a more recent version - upgrade it...

if you've got your own UI or you've got one that's no longer being updated here's how to fix it:

In your ui/custom/styles.xml

add:

Code: Select all

<TabsTemplate>
		<Name>generic_tabs</Name>
		<Parent>none</Parent>
		<ControlAreaFullResizeImageTemplate>dlg_interior_small</ControlAreaFullResizeImageTemplate>
		<TabButtonTemplate>button_tab</TabButtonTemplate>
		<TabXOffset>5</TabXOffset>
		<TabYOffset>2</TabYOffset>
	</TabsTemplate>

	<ButtonTemplate>
		<Name>button_tab</Name>
		<Parent>none</Parent>
		<Size>
			<X>60</X>
			<Y>16</Y>
		</Size>
		<Font>
			<Name>arial9</Name>
			<ColorNormal>
				<R>192</R>
				<G>192</G>
				<B>192</B>
				<A>255</A>
			</ColorNormal>
			<ColorPressed>
				<R>255</R>
				<G>192</G>
				<B>0</B>
				<A>255</A>
			</ColorPressed>
			<ColorHighlit>
				<R>255</R>
				<G>255</G>
				<B>255</B>
				<A>255</A>
			</ColorHighlit>
			<ColorDisabled>
				<R>128</R>
				<G>128</G>
				<B>128</B>
				<A>255</A>
			</ColorDisabled>
		</Font>
		<Texture>
			<TextureName>page4</TextureName>
			<Normal>
				<X>192</X>
				<Y>27</Y>
			</Normal>
			<Pressed>
				<X>192</X>
				<Y>27</Y>
			</Pressed>
			<NormalHighlit>
				<X>192</X>
				<Y>3</Y>
			</NormalHighlit>
			<PressedHighlit>
				<X>192</X>
				<Y>27</Y>
			</PressedHighlit>
			<Disabled>
				<X>192</X>
				<Y>27</Y>
			</Disabled>
		</Texture>
	</ButtonTemplate>

	<HorizontalResizeImageTemplate>
		<Name>listbox_header</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<LeftWidth>4</LeftWidth>
		<RepeatWidth>10</RepeatWidth>
		<RightWidth>4</RightWidth>
		<Texture>
			<TextureName>page1</TextureName>
			<Left>
				<X>0</X>
				<Y>223</Y>
			</Left>
			<Repeat>
				<X>4</X>
				<Y>223</Y>
			</Repeat>
			<Right>
				<X>56</X>
				<Y>223</Y>
			</Right>
		</Texture>
	</HorizontalResizeImageTemplate>
	<HorizontalResizeButtonTemplate>
		<Name>listbox_hrbutton</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<Font>
			<Name>arial9</Name>
			<ColorNormal>
				<R>192</R>
				<G>192</G>
				<B>192</B>
				<A>255</A>
			</ColorNormal>
			<ColorPressed>
				<R>255</R>
				<G>192</G>
				<B>0</B>
				<A>255</A>
			</ColorPressed>
			<ColorHighlit>
				<R>255</R>
				<G>255</G>
				<B>255</B>
				<A>255</A>
			</ColorHighlit>
			<ColorDisabled>
				<R>128</R>
				<G>128</G>
				<B>128</B>
				<A>255</A>
			</ColorDisabled>
		</Font>
		<Normal>listbox_header</Normal>
		<Pressed>listbox_header</Pressed>
		<NormalHighlit>listbox_header</NormalHighlit>
		<PressedHighlit>listbox_header</PressedHighlit>
		<Disabled>listbox_header</Disabled>
	</HorizontalResizeButtonTemplate>




<HorizontalResizeImageTemplate>
		<Name>generic_hr_image_normal</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<LeftWidth>4</LeftWidth>
		<RepeatWidth>10</RepeatWidth>
		<RightWidth>4</RightWidth>
		<Texture>
			<TextureName>page1</TextureName>
			<Left>
				<X>0</X>
				<Y>223</Y>
			</Left>
			<Repeat>
				<X>4</X>
				<Y>223</Y>
			</Repeat>
			<Right>
				<X>56</X>
				<Y>223</Y>
			</Right>
		</Texture>
	</HorizontalResizeImageTemplate>
	<HorizontalResizeImageTemplate>
		<Name>generic_hr_image_pressed</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<LeftWidth>4</LeftWidth>
		<RepeatWidth>10</RepeatWidth>
		<RightWidth>4</RightWidth>
		<Texture>
			<TextureName>page1</TextureName>
			<Left>
				<X>0</X>
				<Y>240</Y>
			</Left>
			<Repeat>
				<X>4</X>
				<Y>240</Y>
			</Repeat>
			<Right>
				<X>56</X>
				<Y>240</Y>
			</Right>
		</Texture>
	</HorizontalResizeImageTemplate>
	<HorizontalResizeImageTemplate>
		<Name>generic_hr_image_normalhighlight</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<LeftWidth>4</LeftWidth>
		<RepeatWidth>10</RepeatWidth>
		<RightWidth>4</RightWidth>
		<Texture>
			<TextureName>page1</TextureName>
			<Left>
				<X>0</X>
				<Y>206</Y>
			</Left>
			<Repeat>
				<X>4</X>
				<Y>206</Y>
			</Repeat>
			<Right>
				<X>56</X>
				<Y>206</Y>
			</Right>
		</Texture>
	</HorizontalResizeImageTemplate>
	<HorizontalResizeImageTemplate>
		<Name>generic_hr_image_disabled</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<LeftWidth>4</LeftWidth>
		<RepeatWidth>10</RepeatWidth>
		<RightWidth>4</RightWidth>
		<Texture>
			<TextureName>page1</TextureName>
			<Left>
				<X>0</X>
				<Y>223</Y>
			</Left>
			<Repeat>
				<X>4</X>
				<Y>223</Y>
			</Repeat>
			<Right>
				<X>56</X>
				<Y>223</Y>
			</Right>
		</Texture>
	</HorizontalResizeImageTemplate>
	<HorizontalResizeButtonTemplate>
		<Name>generic_hr_button</Name>
		<Parent>none</Parent>
		<Height>16</Height>
		<Font>
			<Name>button_large</Name>
			<ColorNormal>
				<R>192</R>
				<G>192</G>
				<B>192</B>
				<A>255</A>
			</ColorNormal>
			<ColorPressed>
				<R>255</R>
				<G>192</G>
				<B>0</B>
				<A>255</A>
			</ColorPressed>
			<ColorHighlit>
				<R>255</R>
				<G>255</G>
				<B>255</B>
				<A>255</A>
			</ColorHighlit>
			<ColorDisabled>
				<R>128</R>
				<G>128</G>
				<B>128</B>
				<A>255</A>
			</ColorDisabled>
		</Font>
		<Normal>generic_hr_image_normal</Normal>
		<Pressed>generic_hr_image_pressed</Pressed>
		<NormalHighlit>generic_hr_image_normalhighlight</NormalHighlit>
		<PressedHighlit>generic_hr_image_pressed</PressedHighlit>
		<Disabled>generic_hr_image_disabled</Disabled>
	</HorizontalResizeButtonTemplate>
	<TextAreaTemplate>
		<Name>generic_textarea_sm</Name>
		<Parent>none</Parent>
		<ScrollbarTemplate>generic_vscroll</ScrollbarTemplate>
		<LinePadding>0</LinePadding>
		<BackgroundTemplate>dlg_interior_small</BackgroundTemplate>
		<TextOffset>
			<X>10</X>
			<Y>5</Y>
		</TextOffset>
		<Font>
			<Name>resize_font</Name>
			<ColorNormal>
				<R>192</R>
				<G>192</G>
				<B>192</B>
				<A>255</A>
			</ColorNormal>
			<ColorActive>
				<R>255</R>
				<G>255</G>
				<B>255</B>
				<A>255</A>
			</ColorActive>
		</Font>
		<ScrollbarOffset>
			<X>3</X>
			<Y>2</Y>
		</ScrollbarOffset>
		<ScrollbarSizeOffset>
			<X>0</X>
			<Y>-4</Y>
		</ScrollbarSizeOffset>
	</TextAreaTemplate>
	<TextAreaTemplate>
		<Name>generic_textarea_sm_nobg</Name>
		<Parent>none</Parent>
		<ScrollbarTemplate>generic_vscroll</ScrollbarTemplate>
		<LinePadding>0</LinePadding>
		<BackgroundTemplate>none</BackgroundTemplate>
		<TextOffset>
			<X>10</X>
			<Y>5</Y>
		</TextOffset>
		<Font>
			<Name>resize_font</Name>
			<ColorNormal>
				<R>192</R>
				<G>192</G>
				<B>192</B>
				<A>255</A>
			</ColorNormal>
			<ColorActive>
				<R>255</R>
				<G>255</G>
				<B>255</B>
				<A>255</A>
			</ColorActive>
		</Font>
		<ScrollbarOffset>
			<X>3</X>
			<Y>2</Y>
		</ScrollbarOffset>
		<ScrollbarSizeOffset>
			<X>0</X>
			<Y>-4</Y>
		</ScrollbarSizeOffset>
	</TextAreaTemplate>
make sure it's added before the </XML> or the </ROOT_ELEMENT>

in your ui/custom/assets.xml add in

Code: Select all

<Texture>
		<Name>page4</Name>
		<File>isles/page_04.tga</File>
	</Texture>
again before the </XML> or </ROOT_ELEMENT> (or whatever the outer node is called).

If this makes no sense to you then get a new UI instead :p ;)
Mortal puppet of Flimgoblin
Captain of the Humberton Blackguard
Post Reply