scripted_gui = {
	################## SETTINGS ##################
	nkmp_startup_settings_gui = {
		window_name = "nkmp_startup_settings_singleplayer_gui_window"
		context_type = player_context
		parent_window_name = "nkmp_startup_gui_window"
		visible = {
			has_country_flag = nkmp_flg_open_startup_gui
		}
		effects = {
			nkmp_startup_puppet_ai_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_enable_puppet_ai
							}
						}
						set_country_flag = nkmp_flg_enable_puppet_ai
					}
					else = {
						clr_country_flag = nkmp_flg_enable_puppet_ai
					}
				}
			}
			nkmp_startup_remove_factions_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_remove_factions
							}
						}
						set_country_flag = nkmp_flg_remove_factions
					}
					else = {
						clr_country_flag = nkmp_flg_remove_factions
					}
				}
			}
			nkmp_startup_remove_guarantees_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_remove_guarantees
							}
						}
						set_country_flag = nkmp_flg_remove_guarantees
					}
					else = {
						clr_country_flag = nkmp_flg_remove_guarantees
					}
				}
			}
			nkmp_startup_remove_vassals_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_remove_vassals
							}
						}
						set_country_flag = nkmp_flg_remove_vassals
					}
					else = {
						clr_country_flag = nkmp_flg_remove_vassals
					}
				}
			}
			nkmp_startup_stop_wars_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_stop_all_wars
							}
						}
						set_country_flag = nkmp_flg_stop_all_wars
					}
					else = {
						clr_country_flag = nkmp_flg_stop_all_wars
					}
				}
			}
			nkmp_startup_global_max_infrastructure_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_global_infrastructure
							}
						}
						set_country_flag = nkmp_flg_global_infrastructure
					}
					else = {
						clr_country_flag = nkmp_flg_global_infrastructure
					}
				}
			}
			nkmp_startup_remove_dmz_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_remove_dmz
							}
						}
						set_country_flag = nkmp_flg_remove_dmz
					}
					else = {
						clr_country_flag = nkmp_flg_remove_dmz
					}
				}
			}
			nkmp_startup_forbid_volunteers_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_forbid_volunteers
							}
						}
						set_country_flag = nkmp_flg_forbid_volunteers
					}
					else = {
						clr_country_flag = nkmp_flg_forbid_volunteers
					}
				}
			}
			nkmp_startup_forbid_lend_lease_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_forbid_lend_lease
							}
						}
						set_country_flag = nkmp_flg_forbid_lend_lease
					}
					else = {
						clr_country_flag = nkmp_flg_forbid_lend_lease
					}
				}
			}
			nkmp_startup_forbid_guarantees_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_forbid_guarantees
							}
						}
						set_country_flag = nkmp_flg_forbid_guarantees
					}
					else = {
						clr_country_flag = nkmp_flg_forbid_guarantees
					}
				}
			}
			nkmp_startup_core_all_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_core_all
							}
						}
						set_country_flag = nkmp_flg_core_all
					}
					else = {
						clr_country_flag = nkmp_flg_core_all
					}
				}
			}
			nkmp_startup_turn_off_energy_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_energy_disabled
							}
						}
						set_country_flag = nkmp_flg_energy_disabled
					}
					else = {
						clr_country_flag = nkmp_flg_energy_disabled
					}
				}
			}
			nkmp_startup_global_turn_off_energy_button_click = {
				ROOT = {
					if = {
						limit = {
							NOT = {
								has_country_flag = nkmp_flg_global_energy_disabled
							}
						}
						set_country_flag = nkmp_flg_global_energy_disabled
					}
					else = {
						clr_country_flag = nkmp_flg_global_energy_disabled
					}
				}
			}
		}
		properties = {
			nkmp_startup_puppet_ai_button = {
				image = [nkmp_startup_puppet_ai_script]
			}
			nkmp_startup_remove_factions_button = {
				image = [nkmp_startup_remove_factions_script]
			}
			nkmp_startup_remove_guarantees_button = {
				image = [nkmp_startup_remove_guarantees_script]
			}
			nkmp_startup_remove_vassals_button = {
				image = [nkmp_startup_remove_vassals_script]
			}
			nkmp_startup_stop_wars_button = {
				image = [nkmp_startup_stop_all_wars_script]
			}
			nkmp_startup_global_max_infrastructure_button = {
				image = [nkmp_startup_global_infrastructure_script]
			}
			nkmp_startup_remove_dmz_button = {
				image = [nkmp_startup_remove_DMZ_script]
			}
			nkmp_startup_forbid_volunteers_button = {
				image = [nkmp_startup_forbid_volunteers_script]
			}
			nkmp_startup_forbid_lend_lease_button = {
				image = [nkmp_startup_forbid_lend_lease_script]
			}
			nkmp_startup_forbid_guarantees_button = {
				image = [nkmp_startup_forbid_guarantees_script]
			}
			nkmp_startup_core_all_button = {
				image = [nkmp_startup_core_all_script]
			}
			nkmp_startup_turn_off_energy_button = {
				image = [nkmp_startup_turn_off_energy_script]
			}
			nkmp_startup_global_turn_off_energy_button = {
				image = [nkmp_startup_global_turn_off_energy_script]
			}
		}
	}
}
