scripted_gui = {

	sp_event_window = {
		window_name = "sp_event_window"
		context_type = player_context

		visible = {
			has_global_flag = rt56rp_gr_superevents_gflag
			has_country_flag = Super_Event_Visible
		}
		
		

		triggers = {
			Super_Event_Image_Israel_Palestine_visible = {
				has_country_flag = MPL_israel_palestine_se
			}
		}
		triggers = {
			Super_Event_Image_spain_visible = {
				has_country_flag = SPR_civil_war_se
			}
		}
		triggers = {
			Super_Event_Image_CHI_japan_visible = {
				has_country_flag = CHI_japan_se
			}
		}
		triggers = {
			Super_Event_Image_PRC_japan_visible = {
				has_country_flag = PRC_japan_se
			}
		}
		triggers = {
			Super_Event_Image_russia_japan_visible = {
				has_country_flag = russia_japan_se
			}
		}
		triggers = {
			Super_Event_Image_britain_germany_visible = {
				has_country_flag = britain_germany_se
			}
		}
		triggers = {
			Super_Event_Image_france_germany_visible = {
				has_country_flag = france_germany_se
			}
		}
		triggers = {
			Super_Event_Image_russia_germany_visible = {
				has_country_flag = russia_germany_se
			}
		}
		triggers = {
			Super_Event_Image_PRC_unify_visible = {
				has_country_flag = PRC_unify_se
			}
		}
		triggers = {
			Super_Event_Image_CHI_unify_visible = {
				has_country_flag = CHI_unify_se
			}
		}
		triggers = {
			Super_Event_Image_wang_unify_visible = {
				has_country_flag = wang_unify_se
			}
		}
		triggers = {
			Super_Event_Image_dai_unify_visible = {
				has_country_flag = dai_unify_se
			}
		}
		triggers = {
			Super_Event_Image_CHI_demo_unify_visible = {
				has_country_flag = CHI_demo_unify_se
			}
		}
		triggers = {
			Super_Event_Image_MAN_unify_visible = {
				has_country_flag = MAN_unify_se
			}
		}
		triggers = {
			Super_Event_Image_palestine_israel_visible = {
				has_country_flag = MPL_palestine_israel_se
			}
		}
		triggers = {
			Super_Event_Image_pacific_visible = {
				has_country_flag = pacific_se
			}
		}
		triggers = {
			Super_Event_Image_nuke_visible = {
				has_country_flag = nuke_se
			}
		}
		triggers = {
			Super_Event_Image_rcw_visible = {
				has_country_flag = SOV_civilwar_se
			}
		}
		triggers = {
			Super_Event_Image_gcw_visible = {
				has_country_flag = GER_civilwar_se
			}
		}
		############
		###BUTTON###
		############
		
		effects = {
			sp_event_close_button_click = {
				clr_country_flag = Super_Event_Visible
				
				
				if = {
					limit = {
						has_country_flag = MPL_israel_palestine_se
					}
					clr_country_flag = MPL_israel_palestine_se
				}
				if = {
					limit = {
						has_country_flag = MPL_palestine_israel_se
					}
					clr_country_flag = MPL_palestine_israel_se
				}
				if = {
					limit = {
						has_country_flag = SPR_civil_war_se
					}
					clr_country_flag = SPR_civil_war_se
				}
				if = {
					limit = {
						has_country_flag = CHI_japan_se
					}
					clr_country_flag = CHI_japan_se
				}
				if = {
					limit = {
						has_country_flag = PRC_japan_se
					}
					clr_country_flag = PRC_japan_se
				}
				if = {
					limit = {
						has_country_flag = russia_japan_se
					}
					clr_country_flag = russia_japan_se
				}
				if = {
					limit = {
						has_country_flag = britain_germany_se
					}
					clr_country_flag = britain_germany_se
				}
				if = {
					limit = {
						has_country_flag = france_germany_se
					}
					clr_country_flag = france_germany_se
				}
				if = {
					limit = {
						has_country_flag = russia_germany_se
					}
					clr_country_flag = russia_germany_se
				}
				if = {
					limit = {
						has_country_flag = PRC_unify_se
					}
					clr_country_flag = PRC_unify_se
				}
				if = {
					limit = {
						has_country_flag = CHI_unify_se
					}
					clr_country_flag = CHI_unify_se
				}
				if = {
					limit = {
						has_country_flag = CHI_demo_unify_se
					}
					clr_country_flag = CHI_demo_unify_se
				}
				if = {
					limit = {
						has_country_flag = dai_unify_se
					}
					clr_country_flag = dai_unify_se
				}
				if = {
					limit = {
						has_country_flag = wang_unify_se
					}
					clr_country_flag = wang_unify_se
				}
				if = {
					limit = {
						has_country_flag = MAN_unify_se
					}
					clr_country_flag = MAN_unify_se
				}
				if = {
					limit = {
						has_country_flag = pacific_SE
					}
					clr_country_flag = pacific_SE
				}
				if = {
					limit = {
						has_country_flag = nuke_SE
					}
					clr_country_flag = nuke_SE
				}
				if = {
					limit = {
						has_country_flag = SOV_civilwar_se
					}
					clr_country_flag = SOV_civilwar_se
				}
				if = {
					limit = {
						has_country_flag = GER_civilwar_se
					}
					clr_country_flag = GER_civilwar_se
				}
			}
		}
	}
}