code:
types ButtonIcons
{
	### Carnalitas buttons

	type button_prison_enslave = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_enslave.dds"
	}

	# rest of vanilla buttons follow

	### Icon buttons 60px

	type button_change = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/replace.dds"
	}

	type button_plus = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/plus.dds"
	}

	type button_minus = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/minus.dds"
	}

	type button_replace = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/replace.dds"
	}

	type button_star_frames = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/star_frames.dds"
		framesize = { 60 60 }

		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx

			upframe = 2
			uphoverframe = 2
			uppressedframe = 2
			downframe = 1
			downhoverframe = 1
			downpressedframe = 1
			disableframe = 2
		}
	}

	type button_dismiss = button_icon_custom
	{
		size = { 24 24 }
		texture = "gfx/interface/icons/flat_icons/cancel_small.dds"
	}

	type button_cancel_small = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/cancel_small.dds"
	}

	type button_cancel = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/cancel.dds"
	}

	type button_clear = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/clear.dds"
	}

	type button_copy = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/copy.dds"
	}

	type button_paste = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/paste.dds"
	}

	type button_add_character = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/add_character.dds"
	}

	type button_menu = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/main_menu.dds"
	}

	type button_go_to_my_location = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/go_to_my_location.dds"
	}

	type button_hide_ui = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/hide_ui.dds"
	}

	type button_show_ui = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/observer.dds"
	}

	type button_pin = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/pin.dds"
		framesize = { 60 60 }
	}

	type button_unpin = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/unpin.dds"
		framesize = { 60 60 }
	}

	type button_go_to_my_capital = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/go_to_my_capital.dds"
	}

	type button_history = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/history.dds"
	}

	type button_promote = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_ransom.dds"

		using = Texture_Placeholder
	}

	type button_play_sound = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/play_sound.dds"
	}

	type button_find_title = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/find_title.dds"
	}

	type button_heir = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/heir.dds"
	}

	type button_title = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/title.dds"
	}

	type button_randomize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/randomize.dds"
	}

	type button_homosexual_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/homosexual_female.dds"
	}

	type button_homosexual_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/homosexual_male.dds"
	}

	type button_heterosexual = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/heterosexual.dds"
	}

	type button_bisexual_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/bisexual_female.dds"
	}

	type button_bisexual_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/bisexual_male.dds"
	}

	type button_asexual = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/asexual.dds"
	}

	type button_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/male.dds"
	}

	type button_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/female.dds"
	}

	type button_revert = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
	}

	type button_undo = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
	}

	type button_redo = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
		mirror = horizontal
	}

	type button_search = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/search.dds"
	}

	type button_edit_text = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/edit_text.dds"
	}

	type button_edit_automation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/edit_automation.dds"
	}

	type button_army_create = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_create_new.dds"
	}

	type button_army_select = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_select.dds"
	}

	type button_army_toggle_raiding = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_toggle_raiding.dds"
	}

	type button_army_raid = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_raid.dds"
	}

	type button_army_raise_assigned = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_raise_assigned.dds"
	}

	type button_army_delete_rally_point = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/rally_point_delete.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_disband"
	}

	type button_army_move_rally_point = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/rally_point_move.dds"
	}

	type button_army_disband = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_disband.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_disband"
	}

	type button_army_merge = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_merge.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_merge"
	}

	type button_army_details = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_details.dds"
	}

	type button_army_reorganize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_reorganize.dds"
	}

	type button_attach_to_unit = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_attach.dds"
	}

	type button_detach_from_unit = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_detach.dds"
	}

	type button_army_split_off_special_troops = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_off_special_troops.dds"
	}

	type button_army_split_off_besiegers = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_off_besiegers.dds"
	}

	type button_army_split_in_half = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_in_half.dds"
	}

	type button_fleet_split_in_half = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/fleet_split_in_half.dds"
	}

	type button_fleet_split_off_unused = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/fleet_split_off_unused.dds"
		clicksound = "event:/SFX/UI/Unit/Fleet/sfx_ui_unit_fleet_split"
	}

	type war_defeat = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_defeat.dds"
	}

	type war_peace = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_white_peace.dds"
	}

	type war_victory = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_victory.dds"
	}

	type button_dots = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dots.dds"
	}

	type button_revoke_lease = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revoke_lease.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_attach"
	}

	type button_pause = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/pause.dds"
	}

	type button_leave_council = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/goto.dds"
	}

	type button_outliner = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/outliner.dds"
	}

	type button_prison_release = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_release.dds"
	}

	type button_prison_ransom = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_ransom.dds"
	}

	type button_prison_execute = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_execute.dds"
	}

	type button_feudalize_holding = button_icon
	{
		framesize = { 70 60 }
		texture = "gfx/interface/icons/flat_icons/feudalize_tribe.dds"
	}

	type button_tribalize_holding = button_icon
	{
		framesize = { 60 60 }
		texture = "gfx/interface/icons/flat_icons/internal_building.dds"
	}

	type button_dynasty_tree = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dynasty.dds"
	}

	type button_barbershop = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/barbershop.dds"
		framesize = { 60 60 }
	}

	type button_kill_list = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_execute.dds"
	}

	type button_memories = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/history.dds"
	}

	type button_royal_court = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/royal_court.dds"
	}

	type button_me = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_me.dds"
	}

	type button_back = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_back.dds"
	}

	type button_forward = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_back.dds"
		mirror = horizontal
	}

	type button_minimize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_minimize.dds"
	}

	type button_close = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_close.dds"
	}

	type button_encyclopedia_small = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/encyclopedia_small.dds"
	}

	type button_election_vote = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/election_vote_strength.dds"
	}

	type button_play = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/play.dds"
	}

	type button_next_track = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/next.dds"
	}

	type button_travel = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/travel.dds"
	}

	type button_migrate = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/migrate.dds"
	}

	type button_situation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/map_modes/situation.dds"
	}

	type button_move_capital = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/move_capital.dds"
	}

	type button_feudal_contract = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/feudal_contract.dds"
	}

	type button_clan_contract = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/clan_contract.dds"
	}

	type button_add_vassal_tax_collector = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/assign_character.dds"
	}

	type button_promote_candidate = button_icon
	{
		texture = "gfx/interface/icons/title_actions/promote_candidate.dds"
	}

	type button_destroy_title = button_icon
	{
		texture = "gfx/interface/icons/title_actions/destroy_title.dds"
	}

	type button_usurp_title = button_icon
	{
		texture = "gfx/interface/icons/title_actions/usurp_title.dds"
	}

	type button_generate_claim = button_icon
	{
		texture = "gfx/interface/icons/title_actions/generate_claim.dds"
	}

	type button_add_laws = button_icon
	{
		texture = "gfx/interface/icons/title_actions/add_laws.dds"
	}

	type button_give_directive = button_icon
	{
		texture = "gfx/interface/icons/activity_types/tour_type_intimidation_icon.dds"
	}

	type button_remove_laws = button_icon
	{
		texture = "gfx/interface/icons/title_actions/clear_laws.dds"
	}

	type button_grant_title_to_vassal = button_icon
	{
		texture = "gfx/interface/icons/title_actions/grant_title_to_vassal.dds"
	}

	type button_make_primary = button_icon
	{
		texture = "gfx/interface/icons/title_actions/make_primary.dds"
	}

	type button_slander = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/slander.dds"
	}

	type button_challenge_status = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/challenge_status.dds"
	}

	type button_request_appointment_support = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/request_appointment_support.dds"
	}

	type button_dispute_border = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dispute_border.dds"
	}

	type button_force_to_step_down = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/force_to_step_down.dds"
	}

	type button_subsume_province = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/subsume_province.dds"
	}

	type button_declare_war = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/declare_war.dds"
	}

	type button_army_automation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_automation_off.dds"
	}

	### Icon buttons, custom size

	type button_plus_small = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/plus_small.dds"
	}

	type button_select_arrow = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/select_arrow.dds"
	}

	type button_minus_small = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/minus_small.dds"
	}

	type button_icon_custom = button_icon {

		size = { 50 50 }
		texture = "gfx/interface/icons/flat_icons/blank.dds"
	}

	type button_icon_war_victory = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_victory.dds"
	}

	type button_icon_war_peace = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_white_peace.dds"
	}

	type button_icon_war_defeat = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_defeat.dds"
	}

	type button_icon_raise_banners = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/raise_banners.dds"
	}

	type button_kick_player = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/kick_player.dds"
	}

	type button_settings_value_track = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/kick_player.dds"
	}

	type button_capture = button_icon {
		size = { 40 40 }
		texture = "gfx/interface/icons/flat_icons/capture.dds"
	}

	type button_adopt_court_language = button_icon {
		texture = "gfx/interface/icons/flat_icons/plus.dds"
	}

	type button_house = button_icon {
		texture = "gfx/interface/icons/flat_icons/house.dds"
	}

	##### FRONTEND BUTTONS #####
	type button_account = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/account.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_achievements = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/achievements.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_credits = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/credits.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_encyclopedia = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/encyclopedia.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_rules = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/rules.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_settings = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/settings.dds"

		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_open_inventory = button_normal
	{
		visible = "[Or( Character.IsLocalPlayer, Or( Character.HasArtifacts, Character.HasAnyArtifactClaims ) )]"
		enabled = "[Or(  Or( Character.IsLocalPlayer, Character.HasArtifacts), Character.HasAnyArtifactClaims )]"
		onclick = "[ToggleGameViewData( 'inventory', Character.GetID )]"
		tooltip = "[SelectLocalization( Or( Or( Character.IsLocalPlayer, Character.HasArtifacts), Character.HasAnyArtifactClaims ),'OPEN_INVENTORY_TOOLTIP','EMPTY_INVENTORY_TOOLTIP')]"

		icon_round_button_base = {}

		button_icon_highlight = {
			block "highlight_icon_size"
			{
				size = { 25 25 }
			}
			parentanchor = center
			texture = "gfx/interface/icons/flat_icons/inventory.dds"
		}
	}

	type button_trait = button_group
	{
		icon_trait = {}
	}

	type button_epidemic = button
	{
		datacontext = "[Epidemic.GetType]"
		texture = "[EpidemicType.GetIcon]"

		size = { 35 35 }

		onclick = "[ToggleGameViewData( 'epidemics', Epidemic.Self )]"

		tooltipwidget = epidemic_tooltip
	}

	type button_legend = button
	{
		datacontext = "[Legend.GetType]"
		texture = "[LegendType.GetIcon]"

		size = { 35 35 }

		onclick = "[ToggleGameViewData( 'legends', Legend.Self )]"

		tooltipwidget = legend_tooltip
	}

	type button_open_memories = button_normal
	{
		name = "open_memories"
		size = { 35 35 }
		tooltip = "OPEN_MEMORIES_TOOLTIP"

		icon_round_button_base = {}

		button_memories = {
			onclick = "[ToggleGameViewData( 'memories', Character.GetID )]"
			size = { 25 25 }
			parentanchor = center
		}
	}

	###############################################################################
	### Add sound effects here to ensure they are consistent between buttons types.

	## Any button that is just an icon or a round frame with icon

	type button_icon_highlight = button_icon {
		alwaystransparent = yes
	}

	type button_icon = button {

		size = { 30 30 }
		texture = "gfx/interface/icons/flat_icons/blank.dds"

		block "button_icon_modify_texture"
		{
			using = Master_Button_Modify_Texture
		}

		block "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
			downframe = 2
			downhoverframe = 2
			downpressedframe = 3
			disableframe = 4
		}
	}
}

template Master_Button_Modify_Texture
{
	modify_texture = {
		texture = "gfx/interface/colors/colors_textured.dds"
		blend_mode = add
		framesize = { 96 96 }
		spritetype = corneredtiled

		block "master_color_frame" {}
	}
}

template Button_Modify_Texture_Placeholder
{
	modify_texture = {
		texture = "gfx/interface/_debug/colors_textured_placeholder.dds"
		blend_mode = add
		framesize = { 96 96 }
		spritetype = corneredtiled

		block "master_color_frame" {}
	}
}


code:
types ButtonIcons
{
	### Icon buttons 60px

	type button_change = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/replace.dds"
	}

	type button_plus = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/plus.dds"
	}

	type button_minus = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/minus.dds"
	}

	type button_replace = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/replace.dds"
	}

	type button_star_frames = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/star_frames.dds"
		framesize = { 60 60 }

		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx

			upframe = 2
			uphoverframe = 2
			uppressedframe = 2
			downframe = 1
			downhoverframe = 1
			downpressedframe = 1
			disableframe = 2
		}
	}

	type button_dismiss = button_icon_custom
	{
		size = { 24 24 }
		texture = "gfx/interface/icons/flat_icons/cancel_small.dds"
	}

	type button_cancel_small = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/cancel_small.dds"
	}

	type button_cancel = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/cancel.dds"
	}

	type button_clear = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/clear.dds"
	}

	type button_copy = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/copy.dds"
	}

	type button_paste = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/paste.dds"
	}

	type button_add_character = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/add_character.dds"
	}

	type button_menu = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/main_menu.dds"
	}

	type button_go_to_my_location = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/go_to_my_location.dds"
	}

	type button_hide_ui = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/hide_ui.dds"
	}

	type button_show_ui = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/observer.dds"
	}

	type button_pin = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/pin.dds"
		framesize = { 60 60 }
	}

	type button_unpin = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/unpin.dds"
		framesize = { 60 60 }
	}

	type button_go_to_my_capital = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/go_to_my_capital.dds"
	}

	type button_history = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/history.dds"
	}

	type button_promote = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_ransom.dds"

		using = Texture_Placeholder
	}

	type button_play_sound = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/play_sound.dds"
	}

	type button_find_title = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/find_title.dds"
	}

	type button_heir = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/heir.dds"
	}

	type button_title = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/title.dds"
	}

	type button_randomize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/randomize.dds"
	}

	type button_homosexual_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/homosexual_female.dds"
	}

	type button_homosexual_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/homosexual_male.dds"
	}

	type button_heterosexual = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/heterosexual.dds"
	}

	type button_bisexual_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/bisexual_female.dds"
	}

	type button_bisexual_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/bisexual_male.dds"
	}

	type button_asexual = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/asexual.dds"
	}

	type button_male = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/male.dds"
	}

	type button_female = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/female.dds"
	}

	type button_revert = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
	}

	type button_undo = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
	}

	type button_redo = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revert.dds"
		mirror = horizontal
	}

	type button_search = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/search.dds"
	}

	type button_edit_text = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/edit_text.dds"
	}

	type button_edit_automation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/edit_automation.dds"
	}

	type button_army_create = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_create_new.dds"
	}

	type button_army_select = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_select.dds"
	}

	type button_army_toggle_raiding = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_toggle_raiding.dds"
	}

	type button_army_raid = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_raid.dds"
	}

	type button_army_raise_assigned = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_raise_assigned.dds"
	}

	type button_army_delete_rally_point = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/rally_point_delete.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_disband"
	}

	type button_army_move_rally_point = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/rally_point_move.dds"
	}

	type button_army_disband = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_disband.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_disband"
	}

	type button_army_merge = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_merge.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_merge"
	}

	type button_army_details = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_details.dds"
	}

	type button_army_reorganize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_reorganize.dds"
	}

	type button_attach_to_unit = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_attach.dds"
	}

	type button_detach_from_unit = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_detach.dds"
	}

	type button_army_split_off_special_troops = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_off_special_troops.dds"
	}

	type button_army_split_off_besiegers = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_off_besiegers.dds"
	}

	type button_army_split_in_half = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_split_in_half.dds"
	}

	type button_fleet_split_in_half = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/fleet_split_in_half.dds"
	}

	type button_fleet_split_off_unused = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/fleet_split_off_unused.dds"
		clicksound = "event:/SFX/UI/Unit/Fleet/sfx_ui_unit_fleet_split"
	}

	type war_defeat = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_defeat.dds"
	}

	type war_peace = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_white_peace.dds"
	}

	type war_victory = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/war_outcome_victory.dds"
	}

	type button_dots = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dots.dds"
	}

	type button_revoke_lease = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/revoke_lease.dds"
		clicksound = "event:/SFX/UI/Unit/Army/sfx_ui_unit_army_attach"
	}

	type button_pause = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/pause.dds"
	}

	type button_leave_council = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/goto.dds"
	}

	type button_outliner = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/outliner.dds"
	}

	type button_prison_release = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_release.dds"
	}

	type button_prison_ransom = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_ransom.dds"
	}

	type button_prison_execute = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_execute.dds"
	}

	type button_feudalize_holding = button_icon
	{
		framesize = { 70 60 }
		texture = "gfx/interface/icons/flat_icons/feudalize_tribe.dds"
	}

	type button_tribalize_holding = button_icon
	{
		framesize = { 60 60 }
		texture = "gfx/interface/icons/flat_icons/internal_building.dds"
	}

	type button_dynasty_tree = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dynasty.dds"
	}

	type button_barbershop = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/barbershop.dds"
		framesize = { 60 60 }
	}

	type button_kill_list = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/prison_execute.dds"
	}

	type button_memories = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/history.dds"
	}

	type button_royal_court = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/royal_court.dds"
	}

	type button_me = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_me.dds"
	}

	type button_back = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_back.dds"
	}

	type button_forward = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_back.dds"
		mirror = horizontal
	}

	type button_minimize = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_minimize.dds"
	}

	type button_close = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/window_close.dds"
	}

	type button_encyclopedia_small = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/encyclopedia_small.dds"
	}

	type button_election_vote = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/election_vote_strength.dds"
	}

	type button_play = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/play.dds"
	}

	type button_next_track = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/next.dds"
	}

	type button_travel = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/travel.dds"
	}

	type button_migrate = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/migrate.dds"
	}

	type button_situation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/map_modes/situation.dds"
	}

	type button_move_capital = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/move_capital.dds"
	}

	type button_feudal_contract = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/feudal_contract.dds"
	}

	type button_clan_contract = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/clan_contract.dds"
	}

	type button_add_vassal_tax_collector = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/assign_character.dds"
	}

	type button_promote_candidate = button_icon
	{
		texture = "gfx/interface/icons/title_actions/promote_candidate.dds"
	}

	type button_destroy_title = button_icon
	{
		texture = "gfx/interface/icons/title_actions/destroy_title.dds"
	}

	type button_usurp_title = button_icon
	{
		texture = "gfx/interface/icons/title_actions/usurp_title.dds"
	}

	type button_generate_claim = button_icon
	{
		texture = "gfx/interface/icons/title_actions/generate_claim.dds"
	}

	type button_add_laws = button_icon
	{
		texture = "gfx/interface/icons/title_actions/add_laws.dds"
	}

	type button_give_directive = button_icon
	{
		texture = "gfx/interface/icons/activity_types/tour_type_intimidation_icon.dds"
	}

	type button_remove_laws = button_icon
	{
		texture = "gfx/interface/icons/title_actions/clear_laws.dds"
	}

	type button_grant_title_to_vassal = button_icon
	{
		texture = "gfx/interface/icons/title_actions/grant_title_to_vassal.dds"
	}

	type button_make_primary = button_icon
	{
		texture = "gfx/interface/icons/title_actions/make_primary.dds"
	}

	type button_slander = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/slander.dds"
	}

	type button_challenge_status = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/challenge_status.dds"
	}

	type button_request_appointment_support = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/request_appointment_support.dds"
	}

	type button_dispute_border = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/dispute_border.dds"
	}

	type button_force_to_step_down = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/force_to_step_down.dds"
	}

	type button_subsume_province = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/subsume_province.dds"
	}

	type button_declare_war = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/declare_war.dds"
	}

	type button_army_automation = button_icon
	{
		texture = "gfx/interface/icons/flat_icons/army_automation_off.dds"
	}

	### Icon buttons, custom size

	type button_plus_small = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/plus_small.dds"
	}

	type button_select_arrow = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/select_arrow.dds"
	}

	type button_minus_small = button_icon_custom
	{
		size = { 20 20 }
		texture = "gfx/interface/icons/flat_icons/minus_small.dds"
	}

	type button_icon_custom = button_icon {

		size = { 50 50 }
		texture = "gfx/interface/icons/flat_icons/blank.dds"
	}

	type button_icon_war_victory = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_victory.dds"
	}

	type button_icon_war_peace = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_white_peace.dds"
	}

	type button_icon_war_defeat = button_icon {
		size = { 35 35 }
		texture = "gfx/interface/icons/flat_icons/war_outcome_defeat.dds"
	}

	type button_icon_raise_banners = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/raise_banners.dds"
	}

	type button_kick_player = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/kick_player.dds"
	}

	type button_settings_value_track = button_icon {
		size = { 70 70 }
		texture = "gfx/interface/icons/flat_icons/kick_player.dds"
	}

	type button_capture = button_icon {
		size = { 40 40 }
		texture = "gfx/interface/icons/flat_icons/capture.dds"
	}

	type button_adopt_court_language = button_icon {
		texture = "gfx/interface/icons/flat_icons/plus.dds"
	}

	type button_house = button_icon {
		texture = "gfx/interface/icons/flat_icons/house.dds"
	}

	##### FRONTEND BUTTONS #####
	type button_account = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/account.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_achievements = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/achievements.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_credits = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/credits.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_encyclopedia = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/encyclopedia.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_rules = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/rules.dds"
		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_settings = button_icon {
		size = { 45 45 }
		texture = "gfx/interface/icons/flat_icons/settings.dds"

		blockoverride "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
		}
	}

	type button_open_inventory = button_normal
	{
		visible = "[Or( Character.IsLocalPlayer, Or( Character.HasArtifacts, Character.HasAnyArtifactClaims ) )]"
		enabled = "[Or(  Or( Character.IsLocalPlayer, Character.HasArtifacts), Character.HasAnyArtifactClaims )]"
		onclick = "[ToggleGameViewData( 'inventory', Character.GetID )]"
		tooltip = "[SelectLocalization( Or( Or( Character.IsLocalPlayer, Character.HasArtifacts), Character.HasAnyArtifactClaims ),'OPEN_INVENTORY_TOOLTIP','EMPTY_INVENTORY_TOOLTIP')]"

		icon_round_button_base = {}

		button_icon_highlight = {
			block "highlight_icon_size"
			{
				size = { 25 25 }
			}
			parentanchor = center
			texture = "gfx/interface/icons/flat_icons/inventory.dds"
		}
	}

	type button_trait = button_group
	{
		icon_trait = {}
	}

	type button_epidemic = button
	{
		datacontext = "[Epidemic.GetType]"
		texture = "[EpidemicType.GetIcon]"

		size = { 35 35 }

		onclick = "[ToggleGameViewData( 'epidemics', Epidemic.Self )]"

		tooltipwidget = epidemic_tooltip
	}

	type button_legend = button
	{
		datacontext = "[Legend.GetType]"
		texture = "[LegendType.GetIcon]"

		size = { 35 35 }

		onclick = "[ToggleGameViewData( 'legends', Legend.Self )]"

		tooltipwidget = legend_tooltip
	}

	type button_open_memories = button_normal
	{
		name = "open_memories"
		size = { 35 35 }
		tooltip = "OPEN_MEMORIES_TOOLTIP"

		icon_round_button_base = {}

		button_memories = {
			onclick = "[ToggleGameViewData( 'memories', Character.GetID )]"
			size = { 25 25 }
			parentanchor = center
		}
	}

	###############################################################################
	### Add sound effects here to ensure they are consistent between buttons types.

	## Any button that is just an icon or a round frame with icon

	type button_icon_highlight = button_icon {
		alwaystransparent = yes
	}

	type button_icon = button {

		size = { 30 30 }
		texture = "gfx/interface/icons/flat_icons/blank.dds"

		block "button_icon_modify_texture"
		{
			using = Master_Button_Modify_Texture
		}

		block "button_frames"
		{
			gfxtype = togglepushbuttongfx
			effectname = "NoHighlight"

			upframe = 1
			uphoverframe = 2
			uppressedframe = 3
			downframe = 2
			downhoverframe = 2
			downpressedframe = 3
			disableframe = 4
		}
	}
}

template Master_Button_Modify_Texture
{
	modify_texture = {
		texture = "gfx/interface/colors/colors_textured.dds"
		blend_mode = add
		framesize = { 96 96 }
		spritetype = corneredtiled

		block "master_color_frame" {}
	}
}

template Button_Modify_Texture_Placeholder
{
	modify_texture = {
		texture = "gfx/interface/_debug/colors_textured_placeholder.dds"
		blend_mode = add
		framesize = { 96 96 }
		spritetype = corneredtiled

		block "master_color_frame" {}
	}
}

repo_name: Synthael/carnalitas

license: mit