<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=GUIs%3A_Layouts</id>
	<title>GUIs: Layouts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=GUIs%3A_Layouts"/>
	<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=GUIs:_Layouts&amp;action=history"/>
	<updated>2026-04-07T15:10:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.splashdamage.com/index.php?title=GUIs:_Layouts&amp;diff=1490&amp;oldid=prev</id>
		<title>192.168.0.142 at 10:35, 16 October 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=GUIs:_Layouts&amp;diff=1490&amp;oldid=prev"/>
		<updated>2007-10-16T10:35:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;== Overview ==&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Layouts are used for automatically ordering windows next to each other.&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{main|GUIs: Layouts}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is often for ordering check boxes and text in the game settings and admin system, ordering center print text vertically on the HUD, etc.&lt;br /&gt;
&lt;br /&gt;
If a group of windows should be ordered after each other vertically or horizontally then a parent window of type [[UILayout_Vertical|vertical]] or [[UILayout_Horizontal|horizontal]] should be used:&lt;br /&gt;
 windowDef lytVertical {&lt;br /&gt;
 	type layoutVertical;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 windowDef lytHorizontal {&lt;br /&gt;
 	type layoutHorizontal;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A window of type [[UILayout_Static|layoutStatic]] should be used if there is a group of windows that does not fit in a vertical/horizontal layout, but the window around them should be:&lt;br /&gt;
 windowDef lytVertical {&lt;br /&gt;
 	type layoutVertical;&lt;br /&gt;
 	properties {&lt;br /&gt;
 		rect rect = 0, 0, 320, SCREEN_HEIGHT;&lt;br /&gt;
 	}&lt;br /&gt;
 	// Absolute window position will be 0, 100.&lt;br /&gt;
 	windowDef {&lt;br /&gt;
 		properties {&lt;br /&gt;
 			rect rect = 0, 100, 320, 30;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 	// Absolute window position will be 0, 150.&lt;br /&gt;
 	windowDef {&lt;br /&gt;
 		type layoutStatic;&lt;br /&gt;
 		properties {&lt;br /&gt;
 			rect rect = 0, 50, 320, 50;&lt;br /&gt;
 		}&lt;br /&gt;
 		// Additional windows here&lt;br /&gt;
 	}&lt;br /&gt;
 	// Absolute window position will be 0, 200.&lt;br /&gt;
 	windowDef {&lt;br /&gt;
 		properties {&lt;br /&gt;
 			rect rect = 0, 0, 320, 30;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Margin and Spaces ==&lt;br /&gt;
A layout may automatically create a margin around the edge of its window or a spacing between child windows.&lt;br /&gt;
 windowDef lytVertical {&lt;br /&gt;
 	type layoutVertical;&lt;br /&gt;
 	properties {&lt;br /&gt;
 		rect rect = 0, 0, 320, SCREEN_HEIGHT;&lt;br /&gt;
 		float margins = 2, 2, 2, 2;&lt;br /&gt;
 		float spacing = 5, 0;&lt;br /&gt;
 	}&lt;br /&gt;
 	// Absolute window position will be 2, 102.&lt;br /&gt;
 	windowDef {&lt;br /&gt;
 		properties {&lt;br /&gt;
 			rect rect = 0, 100, 320, 30;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 	// Absolute window position will be 2, 137 (margin + 102 + spacing).&lt;br /&gt;
 	windowDef {&lt;br /&gt;
 		properties {&lt;br /&gt;
 			rect rect = 0, 0, 320, 30;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Here's an example from the end game scoreboard (''guis/game/scoreboard/scoreboard.gui'') which displays the players with the most XP in the different proficiencies:&lt;br /&gt;
 windowDef lytLeft {&lt;br /&gt;
 	type layoutVertical;&lt;br /&gt;
 	properties {&lt;br /&gt;
 		rect rect = PADDING, _top( awards ), _client_dimension( awards, width ) * 0.5f, _fill_to_bottom_of( awards );&lt;br /&gt;
 		vec4 margins = 0, 0, 0, 0;&lt;br /&gt;
 	}&lt;br /&gt;
 	_rating_button( Soldier, &amp;quot;best_soldier&amp;quot;, localize( &amp;quot;guis/mainmenu/bestsoldier&amp;quot; ), PR_BEST_SOLDIER, 0, 0 )&lt;br /&gt;
 	_rating_button( Medic, &amp;quot;best_medic&amp;quot;, localize( &amp;quot;guis/mainmenu/bestmedic&amp;quot; ), PR_BEST_MEDIC, 0, 0 )&lt;br /&gt;
 	_rating_button( Engineer, &amp;quot;best_engineer&amp;quot;, localize( &amp;quot;guis/mainmenu/bestengineer&amp;quot; ), PR_BEST_ENGINEER, 0, 0 )&lt;br /&gt;
 	_rating_button( FieldOps, &amp;quot;best_fieldops&amp;quot;, localize( &amp;quot;guis/mainmenu/bestfieldops&amp;quot; ), PR_BEST_FIELDOPS, 0, 0 )&lt;br /&gt;
 	_rating_button( CovertOps, &amp;quot;best_covertops&amp;quot;, localize( &amp;quot;guis/mainmenu/bestcovertops&amp;quot; ), PR_BEST_COVERTOPS, 0, 0 )&lt;br /&gt;
 	_rating_button( BattleSense, &amp;quot;best_battlesense&amp;quot;, localize( &amp;quot;guis/mainmenu/bestbattlesense&amp;quot; ),PR_BEST_BATTLESENSE, 0, 0 )&lt;br /&gt;
 	_rating_button( Weapons, &amp;quot;best_weapons&amp;quot;, localize( &amp;quot;guis/mainmenu/bestweapons&amp;quot; ), PR_BEST_LIGHTWEAPONS, 0, 0 )&lt;br /&gt;
 	_rating_button( Vehicles, &amp;quot;best_vehicles&amp;quot;, localize( &amp;quot;guis/mainmenu/bestvehicles&amp;quot; ), PR_BEST_VEHICLE, 0, 0 )&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>192.168.0.142</name></author>
		
	</entry>
</feed>