guiTypes = {
	containerWindowType = {
		name = "topbar_factions_view"
		size = { width = 1272 height = 640 } 
		
		position = { x =  35 y = 40 }

		orientation = upper_left
		moveable = no
		clipping = no
		show_sound = "interface"
		
		background = {
			name = "background"
			spriteType = "GFX_tile_outliner_bg"
		}
		
		iconType = {
			name = "hex_bg"
			spriteType = "GFX_hex_bg"
			position = { x = 5 y = -12 }
			alwaysTransparent = yes
		}
		
		buttonType = {
			name = "tab_council"
			quadTextureSprite = "GFX_tab_1_inactive"
			position = { x = -20 y = 638 }
			buttonText = "COUNCIL"
			shortcut = "z"
			buttonFont = "cg_16b"
			clicksound = "tab_click"
		}

		buttonType = {
			name = "tab_factions"
			quadTextureSprite = "GFX_tab_2_active"
			position = { x = 100 y = 638 }
			buttonText = "FACTIONS"
			shortcut = "x"
			buttonFont = "cg_16b"
			clicksound = "tab_click"
		}

		buttonType = {
			name = "tab_edicts_and_policies"
			quadTextureSprite = "GFX_tab_2_inactive"
			position = { x = 220 y = 638 }
			buttonText = "EDICTS_AND_POLICIES"
			buttonFont = "cg_16b"
			clicksound = "tab_click"
			shortcut = "c"
			oversound = no_sound
		}

		iconType = {
			name = "factions_header_line"
			quadTextureSprite = "GFX_line_long"
			position = { x = 6 y = 25 }
			alwaystransparent = yes
		}

		instantTextBoxType = {
			name = "factions_header"
			font = "malgun_goth_24"
			text = "topbar_button_factions_name"
			position = { x = 35 y = 5 }
			maxWidth = 300
			maxHeight = 20
			fixedSize = yes
			format = left
		}
		
		buttonType = {
			name = "close"
			quadTextureSprite = "GFX_close"
			position = { x = -44 y = 16 }
			orientation = upper_right
			shortcut = "ESCAPE"
			clicksound = "back_click"
			pdx_tooltip = "CLOSE_TITLE"
		}

		iconType = {
			name = "faction_icon"
			quadTextureSprite = "GFX_faction_icon_imperialist"
			position = { x = 10 y = 40 }
			scale = 1.0
		}
		
		buttonType = {
			name = "rename"
			quadTextureSprite = "gfx_transparency_button"
			position = { x = 78 y = 48 }
			size = { x = 248 y = 40 }
			pdx_tooltip = "RENAME_FACTION_TOOLTIP"
			oversound = no_sound
		}
		
		instantTextBoxType = {
			name = "selected_faction_name_label"
			font = "malgun_goth_24"
			text = "Faction Name"
			position = { x = 78 y = 48 }
			maxWidth = 240
			maxHeight = 35
			fixedSize = no
			format = left
			vertical_alignment = center
			alwaysTransparent = yes
		}
		

		containerWindowType = {
			name = "stat_box"
			size = { width = 400 height = 100 }
			position = { x = 0 y = 105 }
			
			
			iconType = {
				name = "stat_bg_01"
				quadTextureSprite = "GFX_satisfaction_bg"
				position = { x = 11 y = 0 }
				alwaysTransparent = yes
			}
		
			iconType = {
				name = "approval_icon"
				spriteType = "GFX_mod_pop_happiness"
				position = { x = 25 y = 5 }
			}

			instantTextBoxType = {
				name = "approval_value"
				font = "malgun_goth_24"
				text = "0"
				position = { x = 40 y = 5 }
				maxWidth = 60
				maxHeight = 35
				fixedSize = yes
				format = right
				text_color_code = "E"
			}

			iconType = {
				name = "stat_bg_02"
				quadTextureSprite = "GFX_satisfaction_bg"
				position = { x = 115 y = 0 }
				alwaysTransparent = yes
			}
			
			iconType = {
				name = "support_icon"
				spriteType = "GFX_faction_attraction_icon"
				position = { x = 122 y = 6 }
			}
			
			instantTextBoxType = {
				name = "support_value"
				font = "malgun_goth_24"
				text = "0"
				position = { x = 120 y = 5 }
				maxWidth = 90
				maxHeight = 35
				fixedSize = yes
				format = right
				text_color_code = "Y"
			}		
			
			iconType = {
				name = "stat_bg_03"
				quadTextureSprite = "GFX_satisfaction_bg"
				position = { x = 219 y = 0 }
				alwaysTransparent = yes
			}

			iconType = {
				name = "pops_icon"
				spriteType = "GFX_planet_view_pop"
				position = { x = 233 y = 1 }
				scale = 1
			}

			instantTextBoxType = {
				name = "pops_amount"
				font = "malgun_goth_24"
				text = "0"
				position = { x = 220 y = 5 }
				maxWidth = 80
				maxHeight = 35
				fixedSize = yes
				format = right
				text_color_code = "E"
			}
		}
			
		buttonType = {
			name = "manage"
			quadTextureSprite = "GFX_standard_button_240_34_button"
			position = { x = 32 y = 143 }
			orientation = "UPPER_LEFT"
			text = "POP_FACTION_MANAGE"
			font = "cg_16b"
		}
				
		buttonType = {
			name = "sort_type"
			#size = { x = 298 y = 35 }
			position = { x = 325 y = 45 }
			spriteType = "GFX_button_75_24"
			buttonFont = "cg_16b"
			text = "TYPE"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_TYPE"
		}		
		
		buttonType = {
			name = "sort_name"
			#size = { x = 298 y = 35 }
			position = { x = 403 y = 52 }
			spriteType = "GFX_standard_button_200_24"
			buttonFont = "cg_16b"
			text = "NAME"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_NAME"
		}	
		
		buttonType = {
			name = "sort_approval"
			#size = { x = 298 y = 35 }
			position = { x = 606 y = 45 }
			spriteType = "GFX_button_116_24"
			buttonFont = "cg_16b"
			text = "APPROVAL"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_APPROVAL"
		}	
		
		buttonType = {
			name = "sort_size"
			#size = { x = 298 y = 35 }
			position = { x = 725 y = 45 }
			spriteType = "GFX_button_75_24"
			buttonFont = "cg_16b"
			text = "SIZE"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_SIZE"
		}
	
		buttonType = {
			name = "sort_support"
			position = { x = 803 y = 45 }
			spriteType = "GFX_button_75_24"
			buttonFont = "cg_16b"
			text = "FACTION_SUPPORT"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_SUPPORT"
		}

		buttonType = {
			name = "sort_ethics"
			position = { x = 881 y = 45 }
			spriteType = "GFX_button_75_24"
			buttonFont = "cg_16b"
			text = "ETHICS"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_ETHIC"
		}
	
		buttonType = {
			name = "sort_demands"
			position = { x = 959 y = 52 }
			spriteType = "GFX_standard_button_190_24"
			buttonFont = "cg_16b"
			text = "POP_FACTIONS_COLUMN_DEMANDS"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_DEMANDS"
		}		
		
		buttonType = {
			name = "sort_effects"
			position = { x = 1151 y = 45 }
			spriteType = "GFX_button_75_24"
			buttonFont = "cg_16b"
			text = "POP_FACTIONS_COLUMN_SUPPORT_EFFECTS"
			font = "cg_16b"
			orientation = UPPER_LEFT
			pdx_tooltip = "FACTIONS_VIEW_SORT_EFFECTS"
		}		
		
		containerWindowType = {
			name = "list_background"
			size = { width = 933 height = 544 }
			position = { x = 328 y = 85 }
	       
			background = {
				name = "leader_frame2"
				spriteType = "GFX_dark_area_cut"
				alwaysTransparent = yes
			}
		}
		
		# Column Labels
		
		containerWindowType = {
			name = "column_labels"
			position = { x = 9990 y = 0 }

			
			instantTextBoxType = {
				name = "column_type"
				font = "cg_16b"
				text = "POP_FACTIONS_COLUMN_TYPE"
				position = { x = 100 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
				pdx_tooltip = "POP_FACTIONS_COLUMN_TYPE_DESC"
			}			
			
			instantTextBoxType = {
				name = "column_leader"
				font = "cg_16b"
				text = "POP_FACTIONS_COLUMN_LEADER"
				position = { x = 30 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
				pdx_tooltip = "POP_FACTIONS_COLUMN_LEADER_DESC"
			}

			instantTextBoxType = {
				name = "column_support"
				font = "cg_16b"
				text = "POP_FACTIONS_COLUMN_SUPPORT"
				position = { x = 200 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
				pdx_tooltip = "POP_FACTIONS_COLUMN_SUPPORT_DESC"
			}
		
			instantTextBoxType = {
				name = "column_demands"
				font = "cg_16b"
				text = "POP_FACTIONS_COLUMN_DEMANDS"
				position = { x = 500 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
				pdx_tooltip = "POP_FACTIONS_COLUMN_DEMANDS_DESC"
			}
		
			instantTextBoxType = {
				name = "column_support_effects"
				font = "cg_16b"
				text = "POP_FACTIONS_COLUMN_SUPPORT_EFFECTS"
				position = { x = 840 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
				pdx_tooltip = "POP_FACTIONS_COLUMN_SUPPORT_EFFECTS_DESC"
			}	
			
			instantTextBoxType = {
				name = "column_ethics"
				font = "cg_16b"
				text = "Pop Ethics Appeal"
				position = { x = 1100 y = 60 }
				maxWidth = 170
				maxHeight = 20
				Orientation = "UPPER_LEFT"
				format = left
			}		
		}

		smoothListboxType = {
			name = "pop_faction_list"
			position = { x = 333 y = 90 }
			size = { x = 905 y = 530 }
			scrollbartype = "standardlistbox_slider"
			spacing = 0
			autohide_scrollbar = no				
		}
		
		gridBoxType = {
			name = "ethics_attraction_list"
			position = { x = 533 y = 68 }
			slotSize = { width = 70 height = 55 }
			max_slots_vertical = 1
			format = "LOWER_LEFT"
			add_horizontal = yes
		}	

		@demands_w = 306
		@demands_h = 378 # formerly 240
		
		containerWindowType = {
			name = "demands"
			position = { x = 11 y = 210 }
			size = { width = @demands_w height = @demands_h }
			moveable = no

			containerWindowType = {
				name = "background"
				position = { x = 0 y = 40 }
				size = { width = @demands_w height = @demands_h }

				background = {
					name = "background"
					spriteType = "GFX_tiles_dark_area_cut_8"
				}
			}
			
						
			iconType = {
				name = "demands_header_line"
				quadTextureSprite = "GFX_line"
				position = { x = -5 y = 23 }
				alwaystransparent = yes
			}

			instantTextBoxType = {
				name = "demands_label"
				font = "malgun_goth_24"
				text = "POP_FACTIONS_COLUMN_DEMANDS"
				position = { x = 10 y = 5 }
				maxWidth = 300
				maxHeight = 20
				fixedSize = yes
				format = left
				#text_color_code = "E"
			}
			
			smoothListboxType = {
				name = "list"
				position = { x = 5 y = 45 }
				size = { x = @demands_w y = @demands_h }
				spacing = 1
				scrollbartype = "standardlistbox_slider"
				autohide_scrollbar = yes
			}
		}
		### ACTIONS

		@actions_w = 340
		@actions_h = 430

		containerWindowType = {
			name = "actions"
			position = { x = 295 y = 155 }
			size = { width = @actions_w height = @actions_h }
			moveable = no

			containerWindowType = {
				name = "background"
				position = { x = -10 y = -5 }
				size = { width = @actions_w height = @actions_h }
			
				background = {
					name = "background"
					spriteType = "GFX_tiles_dark_area_cut_8"
				}
			}

			smoothListboxType = {
				name = "list"
				position = { x = 0 y = 0 }
				size = { x = @actions_w y = @actions_h }
				spacing = 5
			}
		}	
	}
	
	
	containerWindowType = {
		name = "ethics_attraction_entry"
		size = { width = 70 height = 55 }

		iconType = {
			name = "ethic_icon"
			position = { x = 30 y = 0 }
			quadTextureSprite = "GFX_ethics"
		}
		
		instantTextBoxType = {
			name = "ethics_label"
			font = "cg_16b"
			text = "100%"
			position = { x = 65 y = -5 }
			maxWidth = 40
			maxHeight = 40
			format = left
			vertical_alignment = center
		}	
	}
	
	### POP FACTION ENTRY

	containerWindowType = {
		name = "pop_faction_demand"
		size = { width = 300 height = 20 }

		background = {
			name = "demand_hitbox"
			spriteType = "GFX_invisible"
		}

		iconType = {
			name = "icon_good"
			spriteType = "GFX_dot_green_icon"
			position = { x = 2 y = 2 }
			alwaysTransparent = yes
		}
		
		iconType = {
			name = "icon_bad"
			spriteType = "GFX_dot_red_icon"
			position = { x = 2 y = 2 }
			alwaysTransparent = yes
		}

		iconType = {
			name = "icon_neutral"
			spriteType = "GFX_dot_yellow_icon"
			position = { x = 2 y = 2 }
			alwaysTransparent = yes
		}	

		# REMOVE TEXT
		instantTextBoxType = {
			name = "text"
			font = "cg_16b"
			text = "POP_FACTION_DEMAND"
			position = { x = 20 y = 2 }
			maxWidth = 280
			maxHeight = 20

			#fixedSize = yes
			format = left
			alwaysTransparent = yes
		}
	}

	@pop_faction_action_w = 320
	@pop_faction_action_h = 60

	containerWindowType = {
		name = "pop_faction_action"
		size = { width = @pop_faction_action_w height = @pop_faction_action_h }

		containerWindowType = {
			name = "background"
			position = { x = 0 y = 0 }
			size = { width = @pop_faction_action_w height = @pop_faction_action_h }

			background = {
				name = "background"
				spriteType = "GFX_tile_outliner_bg"

			}
		}

		instantTextBoxType = {
			name = "title"
			font = "cg_16b"
			text = "POP_FACTION_ACTION_TITLE"
			position = { x = 10 y = 3 }
			maxWidth = 400
			maxHeight = 30
			fixedSize = yes
			format = left
			text_color_code = "E"
			alwaysTransparent = yes
		}

		instantTextBoxType = {
			name = "text"
			font = "cg_16b"
			text = "POP_FACTION_ACTION_DESCRIPTION"
			position = { x = 10 y = 25 }
			maxWidth = 260
			maxHeight = 60
			#fixedSize = yes
			format = left
			alwaysTransparent = yes
		}

		buttonType = {
			name = "button"
			quadTextureSprite = "GFX_accept_hammer"
			position = { x = -55 y = 23 }
			orientation = "UPPER_RIGHT"
			font = "cg_16b"
		}
	}

	containerWindowType = {
		name = "pop_faction_list_entry"
		size = { width = 905 height = 48 }

		background = {
			name = "background"
			quadTextureSprite = "GFX_clean_frame_area"
		}
		
		# Change texture to this one when selected
		#GFX_glow_tile_orange
		# OR show this object and hide the background. 
		
		containerWindowType = {
			name = "selected_box"
			size = { width = 907 height = 50 }
			position = { x = -1 y = -1 }
			
				background = {
					name = "selection_area"
					spriteType = "GFX_glow_tile_orange"
					clicksound = "interface"
				}
		}
		
		containerWindowType = {
			name = "selection_box"
			size = { width = 905 height = 48 }
			position = { x = 0 y = 0 }
			
				background = {
					name = "selection_area"
					spriteType = "GFX_invisible"
				}
		}
		
		iconType = {
			name = "faction_icon"
			quadTextureSprite = "GFX_faction_icon_imperialist"
			position = { x = 5 y = 0 }
			scale = 0.75
		}
		
		instantTextBoxType = {
			name = "faction_name_header_label"
			font = "cg_16b"
			text = "FACTION_NAME"
			position = { x = 54 y = 7 }
			maxWidth = 270
			maxHeight = 35
			fixedSize = yes
			format = left
			alwaysTransparent = yes
		}
		
		containerWindowType = {
			name = "approval"
			size = { width = 80 height = 25 }
			position = { x = 300 y = 10 }
			
			background = {
				name = "approval_hitbox"
				spriteType = "GFX_invisible"
			}

			instantTextBoxType = {
				name = "value"
				font = "cg_16b"
				text = "0"
				position = { x = 15 y = 5 }
				maxWidth = 60
				maxHeight = 35
				fixedSize = yes
				format = center
				text_color_code = "E"
				alwaysTransparent = yes
			}
		}
		
		containerWindowType = {
			name = "pops"
			size = { width = 120 height = 25 }
			position = { x = 407 y = 10 }

			background = {
				name = "pops_hitbox"
				spriteType = "GFX_invisible"
			}

			iconType = {
				name = "icon"
				spriteType = "GFX_planet_view_pop"
				position = { x = 10 y = 1 }
				alwaysTransparent = yes
				scale = 0.85
			}

			instantTextBoxType = {
				name = "amount"
				font = "cg_16b"
				text = "0"
				position = { x = -10 y = 5 }
				maxWidth = 100
				maxHeight = 35
				fixedSize = yes
				format = center
				text_color_code = "E"
				alwaysTransparent = yes
			}
		}

		containerWindowType = {
			name = "support"
			size = { width = 100 height = 30 }
			position = { x = 470 y = 10 }
			
			background = {
				name = "support_hitbox"
				spriteType = "GFX_invisible"
			}
		
			iconType = {
				name = "icon"
				spriteType = "GFX_has_ftl_magnet"
				position = { x = 15 y = -3 }
				alwaysTransparent = yes
			}
			
			instantTextBoxType = {
				name = "value"
				font = "cg_16b"
				text = "0"
				position = { x = 15 y = 5 }
				maxWidth = 90
				maxHeight = 35
				fixedSize = yes
				format = center
				text_color_code = "Y"
				alwaysTransparent = yes
			}
		}

		containerWindowType = {
			name = "ethic"
			size = { width = 100 height = 30 }
			position = { x = 545 y = 9 }
			
			background = {
				name = "ethic_hitbox"
				spriteType = "GFX_invisible"
			}
		
			instantTextBoxType={
				name = "ethic_texticons"
				position = { x = 22 y = 0 }
				orientation = "UPPER_LEFT"
				font = "cg_16b"
				text = ""
				vertical_alignment = center
				maxWidth = 65
				maxHeight = 30
				alwaysTransparent = no
				format = center
			}
		}
			
		containerWindowType = {
			name = "influence_hitbox"
			size = { width = 100 height = 30 }
			position = { x = 800 y = 8 }
			
			background = {
				name = "influence_hitbox"
				spriteType = "GFX_invisible"
				clicksound = "interface"
			}

			instantTextBoxType={
				name = "influence_label"
				position = { x = 35 y = 0 }
				orientation = "UPPER_LEFT"
				font = "cg_16b"
				text = "INFLUENCE_GAIN_FROM_FACTION"
				vertical_alignment = center
				maxWidth = 65
				maxHeight = 30
				alwaysTransparent = yes
			}		
		}

		gridBoxType = {
			name = "demands_list"
			position = { x = 650 y = 16 }
			slotSize = { width = 15 height = 15 }
			max_slots_vertical = 2
			max_slots_horizontal = 10
			format = "UPPER_LEFT"
			add_horizontal = yes
		}
	}
	
	containerWindowType = {
		name = "pop_faction_icon_entry_green"
		size = { width = 15 height = 15 }

		iconType = {
			name = "icon"
			spriteType = "GFX_dot_green_icon"
			position = { x = 2 y = 0 }
			alwaysTransparent = yes
		}
	}
	
	containerWindowType = {
		name = "pop_faction_icon_entry_yellow"
		size = { width = 20 height = 20 }

		iconType = {
			name = "icon"
			spriteType = "GFX_dot_yellow_icon"
			position = { x = 2 y = 0 }
			alwaysTransparent = yes
		}
	}
	
	containerWindowType = {
		name = "pop_faction_icon_entry_red"
		size = { width = 20 height = 20 }

		iconType = {
			name = "icon"
			spriteType = "GFX_dot_red_icon"
			position = { x = 2 y = 0 }
			alwaysTransparent = yes
		}
	}
}
