scripted_gui = {

	ps_system = {
		context_type = player_context
		
		window_name = "ps_system_container"
		
		visible = {
			always = yes
		}

		effects = {
		}
	}
	
	ps_system_diplo = {
		context_type = selected_country_context
		window_name = "ps_system_diplo" 
		parent_window_token = selected_country_view_info
		
		visible = {
			always = yes
		}

		effects = {
		}
	}
    

	population_information = {
		context_type = player_context
		
		window_name = "population_information_container"
		
		visible = {
			always = yes
		}

		effects = {
		}
	}
	
	allies_info = {
		context_type = selected_country_context
		
		window_name = "show_allies"
		parent_window_token = selected_country_view_diplomacy 
		
		visible = {
			THIS = {
				check_variable = { allies_array^v > 0 }  				}
		}

		effects = {
		}
		
		dynamic_lists = {
			show_grid = {
				array = allies_array
				entry_container = show_entry_3
			} 
		}
		properties = {
			flag = { image = "[?This.allies_array^i.GetFlag]" } 
		}
		
		triggers = {
		}

		ai_weights = { 
		}
	} 
	
	call_allies_gui = { 
		context_type = selected_country_context
		window_name = "call_allies" 
		
		visible = {
			check_variable = { show_call_allies_var > 0 }
		}
		  
		effects = {	
			enemies_button1_click = {
				THIS = {
					set_temp_variable = { show_button^i = 2 }
					subtract_from_temp_variable = { show_button^i = show_enemies_button_1^i }
					set_variable = { show_enemies_button_1^i = show_button^i }
					add_to_array = { enemies_array_call_temp = Root.enemies^i }
				}
			}
		}

		dynamic_lists = {
			show_grid = {
				array = Root.enemies
				entry_container = show_entry_4  
			} 
		}
		properties = {
			flag = { image = "[?Root.enemies^i.GetFlag]" } 
			enemies_button1 = { frame = show_enemies_button_1^i }
		}
		
		triggers = {
		}

		ai_weights = {
		}
	}
}