scripted_gui = {

    KR_unit_limits_deployment = {
		context_type = player_context
		window_name = "KR_unit_limit_deployment_tab"
		parent_window_token = deployment_tab

		ai_enabled = {
			always = no
		}

		visible = {
			
			NOT = {
				has_global_flag = KR_no_unit_limits
				has_global_flag = KR_unit_limits_ai_only
			}
		}
	}
	KR_unit_limits_army_view = {
		context_type = player_context
		window_name = "KR_unit_limit_countryarmyview"
		parent_window_name = countryarmyview

		ai_enabled = {
			always = no
		}

		visible = {
			
			NOT = {
				has_global_flag = KR_no_unit_limits
				has_global_flag = KR_unit_limits_ai_only
			}
		}
	}
	KR_unit_limits_alert = {
		context_type = player_context
		window_name = "KR_unit_limit_alert_container"
		parent_window_token = top_bar

		ai_enabled = {
			always = no
		}

		visible = {
			is_ai = no
			has_dlc = "La Resistance"
			has_reached_maximum_divisions = yes
			NOT = {
				has_global_flag = KR_no_unit_limits
				has_global_flag = KR_unit_limits_ai_only
			}
		}
	}
	KR_unit_limits_alert_non_LaR = {
		context_type = player_context
		window_name = "KR_unit_limit_alert_container"
		parent_window_token = top_bar

		ai_enabled = {
			always = no
		}

		visible = {
			is_ai = no
			NOT = { has_dlc = "La Resistance" }
			has_reached_maximum_divisions = yes
			NOT = {
				has_global_flag = KR_no_unit_limits
				has_global_flag = KR_unit_limits_ai_only
			}
		}

		properties = {
			unit_limit_alert = {
				x = -55
			}
		}
	}
}
