scripted_gui = {
	innovation_progress = {
		window_name = "innovation_progress_container"

		context_type = player_context

		parent_window_token = topbar

		ai_enabled = { always = no }

		visible = {
		# 	OR = {
		# 		# has_idea = AF_T_unorganized_tribal_nation
		# 		# has_idea = AF_T_unorganized_tribal_nation_2
		# 		# has_idea = AF_T_unorganized_tribal_nation_3
		# 		# has_idea = AF_T_unorganized_tribal_nation_4
		# 		# has_idea = AF_T_unorganized_tribal_nation_5
		# 		# has_idea = AF_T_organized_tribal_nation
		# 		has_idea = afr_reforming_kingdom
		# 		has_country_flag = Oceania_industrializing
		# 		has_country_flag = afr_colony_industrializing
		# 		has_country_flag = afr_an_african_industrializing
		# 	}
		}

		effects = {
			innovation_progress_bg_click = {
				set_temp_variable = { show = 1 }
				subtract_from_temp_variable = { show = show_innovation_progress }
				set_variable = { show_innovation_progress = show }
				if = {
					limit = { tag = RUS }
					if = {
						limit = { has_country_flag = russian_peasant_reform_gui_flag }
						clr_country_flag = russian_peasant_reform_gui_flag
					}
					else = {
						set_country_flag = russian_peasant_reform_gui_flag
					}
				}
			}
			# innovation_progress_bg_click = {
			# 	add_to_variable = { innovation_progress = 10 }
			# 	# clamp_variable = { var = innovation_progress min = 0 max = 100 }
			# }
		}
		triggers = {
			innovation_progress_bg_click_enabled = { always = yes }
		}

		properties = {
			innovation_progress_icon = {
				frame = ROOT.institutions_country_era
			}
		}
	}
	humanities_progress = {
		window_name = "humanities_progress_container"

		context_type = player_context

		parent_window_token = topbar

		ai_enabled = { always = no }

		visible = {

		}

		effects = {
			humanities_progress_bg_click = {
				set_temp_variable = { show = 1 }
				subtract_from_temp_variable = { show = show_humanities_progress }
				set_variable = { show_humanities_progress = show }
			}
			# humanities_progress_bg_click = {
			# 	add_to_variable = { humanities_progress = 10 }
			# 	# clamp_variable = { var = humanities_progress min = 0 max = 100 }
			# }
		}
		triggers = {
			humanities_progress_bg_click_enabled = { always = yes }
		}

		properties = {
			humanities_progress_icon = {
				frame = ROOT.institutions_country_era
			}
		}
	}	
	suez_canal_construction = {
		context_type = decision_category
		window_name = "suez_canal_construction_window"

		properties = {
			suez_construction_bar = {
				frame = EGY.suez_progress
			}
			suez_inprogress_construction_bar = {
				frame = EGY.suez_inprogress_total
			}
			investor_flag = { image = "[?EGY.suezInvestors^i.GetFlag]" }
		}
		dynamic_lists = {
			show_grid = {
				array = EGY.suezInvestors
				entry_container = suez_stockholder_entry
			}
		}
		triggers={
			suez_construction_header_visible={
				NOT={has_global_flag = SUEZ_CANAL_BUILT}
			}
			suez_operation_header_visible={
				has_global_flag = SUEZ_CANAL_BUILT
			}
		}
	}
	
	superevents_eoanb = {
		context_type = player_context
		window_name = "superevents_container"

		visible = {
			check_variable = {super_event_displayed > 0}
		}
		properties = {
			debug_super_event = { image = "[get_super_event_image]"}
		}
        effects = {
			ok_button_click={
				set_variable = {super_event_displayed = 0}
			}
        }
	}
	#sound effects
	eoanb_se_berlin_conference_sound = {#berlin conference is 1
		context_type = player_context
		window_name = "berlin_conference_sound_container"
		visible = {
			check_variable = {super_event_displayed = 1}
		}
	}
	eoanb_se_scramble_for_africa_sound = {#scramble is 2
		context_type = player_context
		window_name = "scramble_for_africa_sound_container"
		visible = {
			check_variable = {super_event_displayed = 2}
		}
	}
	eoanb_se_crash_1857_sound = {
		context_type = player_context
		window_name = "crash_1857_sound_container"
		visible = {
			check_variable = {super_event_displayed = 3}
		}
	}
	eoanb_se_suez_canal_sound = {
		context_type = player_context
		window_name = "suez_canal_sound_container"
		visible = {
			check_variable = {super_event_displayed = 4}
		}
	}
	eoanb_se_revolutions_across_italy_sound = {
		context_type = player_context
		window_name = "revolutions_across_italy_sound_container"
		visible = {
			check_variable = {super_event_displayed = 5}
		}
	}
	eoanb_se_tuscan_risorgremento_sound = {
		context_type = player_context
		window_name = "tuscan_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 6}
		}
	}
	eoanb_se_carvour_risorgremento_sound = {
		context_type = player_context
		window_name = "carvour_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 7}
		}
	}
	eoanb_se_garibaldi_risorgremento_sound = {
		context_type = player_context
		window_name = "garibaldi_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 8}
		}
	}
	eoanb_se_acw_sound = {
		context_type = player_context
		window_name = "acw_sound_container"
		visible = {
			check_variable = {super_event_displayed = 9}
		}
	}
	eoanb_se_collapse_union_sound = {
		context_type = player_context
		window_name = "collapse_union_sound_container"
		visible = {
			check_variable = {super_event_displayed = 10}
		}
	}
	eoanb_se_poland_restoration_sound = {
		context_type = player_context
		window_name = "poland_restoration_sound_container"
		visible = {
			check_variable = {super_event_displayed = 11}
		}
	}
	eoanb_se_meji_restoration_sound = {
		context_type = player_context
		window_name = "meji_restoration_sound_container"
		visible = {
			check_variable = {super_event_displayed = 12}
		}
	}
	eoanb_se_shogun_victory_sound = {
		context_type = player_context
		window_name = "shogun_victory_sound_container"
		visible = {
			check_variable = {super_event_displayed = 13}
		}
	}
	eoanb_se_GER_unified_bismark_sound = {
		context_type = player_context
		window_name = "ger_unify_bismark_sound_container"
		visible = {
			check_variable = {super_event_displayed = 14}
		}
	}
	eoanb_se_GER_unified_socialist_sound = {
		context_type = player_context
		window_name = "ger_unify_social_sound_container"
		visible = {
			check_variable = {super_event_displayed = 15}
		}
	}
	eoanb_se_GER_unified_liberal_sound = {
		context_type = player_context
		window_name = "ger_unify_liberal_sound_container"
		visible = {
			check_variable = {super_event_displayed = 16}
		}
	}
	eoanb_se_GER_unified_confed_sound = {
		context_type = player_context
		window_name = "ger_unify_confed_sound_container"
		visible = {
			check_variable = {super_event_displayed = 17}
		}
	}
	eoanb_se_GER_unified_wuttemberg_sound = {
		context_type = player_context
		window_name = "ger_unify_wuttemberg_sound_container"
		visible = {
			check_variable = {super_event_displayed = 19}
		}
	}

	eoanb_se_triple_alliance_sound = {
		context_type = player_context
		window_name = "triple_alliance_sound_container"
		visible = {
			check_variable = {super_event_displayed = 20}
		}
	}
	eoanb_se_irish_independance_sound = {
		context_type = player_context
		window_name = "irish_independance_sound_container"
		visible = {
			check_variable = {super_event_displayed = 21}
		}
	}
	eoanb_se_roman_risorgremento_sound = {
		context_type = player_context
		window_name = "roman_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 22}
		}
	}
	eoanb_se_sicilian_risorgremento_sound = {
		context_type = player_context
		window_name = "sicilian_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 23}
		}
	}
	eoanb_se_papal_risorgremento_sound = {
		context_type = player_context
		window_name = "papal_risorgremento_sound_container"
		visible = {
			check_variable = {super_event_displayed = 24}
		}
	}
	eoanb_se_franco_prussian_sound = {
		context_type = player_context
		window_name = "franco_prussian_sound_container"
		visible = {
			check_variable = {super_event_displayed = 25}
		}
	}
	eoanb_se_down_under_sound = {
		context_type = player_context
		window_name = "down_under_sound_container"
		visible = {
			check_variable = {super_event_displayed = 26}
		}
	}
	eoanb_se_russio_turkish_sound = {
		context_type = player_context
		window_name = "russio_turkish_sound_container"
		visible = {
			check_variable = {super_event_displayed = 27}
		}
	}
	eoanb_se_qing_collapse_sound = {
		context_type = player_context
		window_name = "qing_collapse_sound_container"
		visible = {
			check_variable = {super_event_displayed = 28}
		}
	}
	eoanb_se_manned_flight_sound = {
		context_type = player_context
		window_name = "manned_flight_sound_container"
		visible = {
			check_variable = {super_event_displayed = 29}
		}
	}
	eoanb_se_panama_canal_sound = {
		context_type = player_context
		window_name = "panama_canal_sound_container"
		visible = {
			check_variable = {super_event_displayed = 30}
		}
	}
	eoanb_se_1873_panic_sound = {
		context_type = player_context
		window_name = "1873_panic_sound_container"
		visible = {
			check_variable = {super_event_displayed = 31}
		}
	}
	eoanb_se_sa_unifaction_sound = {
		context_type = player_context
		window_name = "sa_unifaction_sound_container"
		visible = {
			check_variable = {super_event_displayed = 32}
		}
	}
	eoanb_se_canada_unifaction_sound = {
		context_type = player_context
		window_name = "canada_unifaction_sound_container"
		visible = {
			check_variable = {super_event_displayed = 33}
		}
	}
	eoanb_se_100_days_sound = {
		context_type = player_context
		window_name = "100_days_sound_container"
		visible = {
			check_variable = {super_event_displayed = 34}
		}
	}
	eoanb_se_xinghai_revo_sound = {
		context_type = player_context
		window_name = "xinghai_revo_sound_container"
		visible = {
			check_variable = {super_event_displayed = 35}
		}
	}
	eoanb_se_great_war_sound = {
		context_type = player_context
		window_name = "great_war_sound_container"
		visible = {
			check_variable = {super_event_displayed = 36}
		}
	}
	eoanb_se_2WW_sound = {
		context_type = player_context
		window_name = "2WW_sound_container"
		visible = {
			check_variable = {super_event_displayed = 37}
		}
	}
	eoanb_se_krakatoa_sound = {
		context_type = player_context
		window_name = "krakatoa_sound_container"
		visible = {
			check_variable = {super_event_displayed = 38}
		}
	}
	eoanb_se_great_depression_sound = {
		context_type = player_context
		window_name = "great_depression_sound_container"
		visible = {
			check_variable = {super_event_displayed = 39}
		}
	}
	eoanb_se_great_famine_sound = {
		context_type = player_context
		window_name = "great_famine_sound_container"
		visible = {
			check_variable = {super_event_displayed = 40}
		}
	}
	eoanb_se_55_days_sound = {
		context_type = player_context
		window_name = "55_days_sound_container"
		visible = {
			check_variable = {super_event_displayed = 41}
		}
	}
	eoanb_orsini_affair_sound = {
		context_type = player_context
		window_name = "orsini_affair_sound_container"
		visible = {
			check_variable = {super_event_displayed = 42}
		}
	}
	eoanb_muhgal_restored_sound = {
		context_type = player_context
		window_name = "mughal_restored_sound_container"
		visible = {
			check_variable = {super_event_displayed = 43}
		}
	}

	##### Easter Egg Super Events
	eoanb_se_acw_ger_sound = {
		context_type = player_context
		window_name = "ger_acw_sound_container"
		visible = {
			check_variable = {super_event_displayed = 9901}
		}
	}

	eoanb_se_super_event_sound = {
		context_type = player_context
		window_name = "superevent_sound_container"
		visible = {
			check_variable = {super_event_displayed > 41}
			NOT = {
				check_variable = { super_event_displayed > 9900 }
			}
		}
	}

	taiping_princely_influence = {
		context_type = decision_category
		window_name = "taiping_princely_influence_window"

		properties = {
			taiping_princely_influence_li_xiucheng = {
				frame = tai_li_xiucheng
			}
		}
		triggers={
			# suez_construction_header_visible={
				# NOT={has_global_flag = SUEZ_CANAL_BUILT}
			# }
			# suez_operation_header_visible={
				# has_global_flag = SUEZ_CANAL_BUILT
			# }
		}
	}
}