scripted_gui = {

	esbuff_cheat_menu_sidebar_background = {
		context_type = player_context
		parent_window_token = politics_tab
		window_name = "esbuff_cheat_menu_sidebar_background_window"
	
		visible = { 
			has_variable = esbuff_cheat_menu_opened
		 }
	}

	esbuff_cheat_menu_categories = { 
		context_type = player_context
		parent_window_name = "esbuff_cheat_menu_sidebar_background_window_inner"
		window_name = "esbuff_cheat_menu_categories_window"

		visible = {
			has_variable = esbuff_cheat_menu_opened
		}

		effects = { 
			esb_cm_close_click = {
				clear_variable = esbuff_cheat_menu_opened
			}
			esb_cm_back_to_menu_click = {
				set_variable = { esbuff_cheat_menu_opened = 1 }
			}
			#Button 1
			esbuff_cm_1_category_button_click = { 
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 2 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					esbuff_cm_buildings_17 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_infantry = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
					esbuff_cm_cwic_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
					set_variable = { esbuff_cheat_menu_opened = 71 }
				}
				else_if = { #Factions and Parties2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 71}
					}
					esbuff_cm_factions_parties_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 72}
					}
					esbuff_cm_factions_parties_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					esbuff_cm_cores_domain_all_disc_cores = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 81}
					}
					esbuff_cm_cores_domain_make_rndm_states_core = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 82}
					}
					esbuff_cm_cores_domain_cntrl_core_states_rndm = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain4
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 83}
					}
					esbuff_cm_cores_domain_cntrl_nghbr_states_rndm_enemy = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain5
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 84}
					}
					esbuff_cm_cores_domain_puppet_rndm = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain6
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 85}
					}
					esbuff_cm_cores_domain_capital_10divs = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
					esbuff_cm_leaders_1 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
			}
			#Button 2
			esbuff_cm_2_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 3 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_4 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					esbuff_cm_buildings_18 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_armored = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
					esbuff_cm_cwic_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
					esbuff_cm_factions_parties_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 71}
					}
					esbuff_cm_factions_parties_4 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 72}
					}
					esbuff_cm_factions_parties_5 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					set_variable = { esbuff_cheat_menu_opened = 81 }
				}
				else_if = { #Cores and Domain2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 81}
					}
					esbuff_cm_cores_domain_make_cntrld_states_core = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 82}
					}
					esbuff_cm_cores_domain_cntrl_core_states_all = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain4
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 83}
					}
					esbuff_cm_cores_domain_cntrl_nghbr_states_rndm = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain5
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 84}
					}
					esbuff_cm_cores_domain_puppet_nghbr = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain6
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 85}
					}
					esbuff_cm_cores_domain_capital_20divs = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
					esbuff_cm_leaders_2 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
			}
			#Button 3
			esbuff_cm_3_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 4 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_5 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_6 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					esbuff_cm_buildings_19 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_navy = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
					esbuff_cm_cwic_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
					esbuff_cm_factions_parties_6 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 71}
					}
					esbuff_cm_factions_parties_7 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 72}
					}
					esbuff_cm_factions_parties_8 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					esbuff_cm_cores_domain_lose_cores = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 81}
					}
					esbuff_cm_cores_domain_make_claimed_states_core = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 82}
					}
				}
				else_if = { #Cores and Domain4
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 83}
					}
					esbuff_cm_cores_domain_cntrl_nghbr_states_nghbr_20divs = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain5
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 84}
					}
					esbuff_cm_cores_domain_puppet_enemy = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain6
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 85}
					}
					esbuff_cm_cores_domain_capital_rndm = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
					esbuff_cm_leaders_3 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
			}
			#Button 4
			esbuff_cm_4_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 5 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_7 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_8 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					esbuff_cm_buildings_20 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_4 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_air = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_4 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
					set_variable = { esbuff_cheat_menu_opened = 72 }
				}
				else_if = { #Factions and Parties2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 71}
					}
					esbuff_cm_factions_parties_9 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Factions and Parties3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 72}
					}
					esbuff_cm_factions_parties_10 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					set_variable = { esbuff_cheat_menu_opened = 82 }
					esbuff_cm_cores_domain_cntrl_core_states_cat = yes
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_4 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
				}
			}
			#Button 5
			esbuff_cm_5_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 6 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_9 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_10 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					esbuff_cm_buildings_21 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_5 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_engineering = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_5 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					set_variable = { esbuff_cheat_menu_opened= 83 }
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_5 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
				}
			}
			#Button 6
			esbuff_cm_6_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 7 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_11 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_12 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_6 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_industry = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_6 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					set_variable = { esbuff_cheat_menu_opened = 84 }
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					esbuff_cm_static_modif_6 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}

				}
			}
			#Button 7
			esbuff_cm_7_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 8 }
					esbuff_cm_cores_domain_cat = yes
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_13 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_14 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_7 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_rocketry = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_7 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					set_variable = { esbuff_cheat_menu_opened = 85 }
					esbuff_cm_cores_domain_capital_cat = yes
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
				}
			}
			#Button 8
			esbuff_cm_8_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 9 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					esbuff_cm_buildings_15 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					esbuff_cm_buildings_16 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					set_variable = { esbuff_cheat_menu_opened = 2 }
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_8 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_space = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_8 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					esbuff_cm_cores_domain_white_peace = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
				}
			}
			#Button 9
			esbuff_cm_9_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1}
					}
					set_variable = { esbuff_cheat_menu_opened = 10 }
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2}
					}
					set_variable = { esbuff_cheat_menu_opened = 12 }
				}
				else_if = { #Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12}
					}
					set_variable = { esbuff_cheat_menu_opened = 13 }
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					set_variable = { esbuff_cheat_menu_opened = 12 }
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3}
					}
					esbuff_cm_resources_9 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4}
					}
					esbuff_cm_tech_wmd = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5}
					}
					esbuff_cm_points_exps_9 = yes
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6}
					}
				}
				else_if = { #Factions and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7}
					}
				}
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
				}
				else_if = { #Static Modifiers
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
				}
				else_if = { #Leaders
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
				}
			}
			#Button 10
			esbuff_cm_10_category_button_click = {
				if = {
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 1 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Buildings
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 2 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { # Buildings2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 12 }
					}
					set_variable = { esbuff_cheat_menu_opened = 2 }
				}
				else_if = { #Buildings3
 					limit = {
						check_variable = { esbuff_cheat_menu_opened = 13}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Resources
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 3 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}	
				else_if = { #Tech
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 4 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}	
				else_if = { #Points and Exps
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 5 }
					}
					esbuff_cm_points_exps_10 = yes
					clear_variable = esbuff_cheat_menu_opened
				}		
				else_if = { #CWIC
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 6 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}		
				else_if = { #Faction and Parties
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 7 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}			
				else_if = { #Faction and Parties2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 71 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}	
				else_if = { #Faction and Parties3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 72 }
					}
					clear_variable = esbuff_cheat_menu_opened
				}	
				else_if = { #Cores and Domain
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 8}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain2
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 81}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain3
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 82}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain4
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 83}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain5
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 84}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain6
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 85}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain5
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 9}
					}
					clear_variable = esbuff_cheat_menu_opened
				}
				else_if = { #Cores and Domain6
					limit = {
						check_variable = { esbuff_cheat_menu_opened = 10}
					}
					clear_variable = esbuff_cheat_menu_opened
				}

			}

		}


	}

}