
note
	description: "[
		A widget connecting interface to an AIR_UNIT for use in Victory in the Pacific.
		]"
	author: "Jimmy J. Johnson"

class
	AIR_UNIT_WIDGET

inherit

	ATTACK_UNIT_WIDGET
		redefine
			position_widgets,
			unit_color,
			target_imp
		end

create
	make

feature {NONE} -- Initialization

	position_widgets
			-- Redefined to make smaller than the attack widget
		do
			Precursor {ATTACK_UNIT_WIDGET}
			scale (0.7)
		end

feature -- Access

feature {NONE} -- Implementation

	unit_color: EV_COLOR
			-- Get the color to paint the tile based on the unit's nationality
		do
			if unit.nationality = {NATIONALITY_CONSTANTS}.Japanese then
				Result := Japanese_air_unit_color
			elseif unit.nationality = {NATIONALITY_CONSTANTS}.us then
				Result := US_air_unit_color
			else
				check
					should_not_happen: False
				end
				Result := Green
			end
		end

feature {NONE} -- Implementation

	target_imp: detachable AIR_UNIT
			-- Anchor for the `target' represented by Current

end
