note
	description: "The state of a Joystick hat"
	author: "Louis Marchand"
	date: "Thu, 02 Apr 2015 02:40:10 +0000"
	revision: "2.0"

class 
	GAME_JOYSTICK_HAT_STATE

create {GAME_SDL_ANY}
	make

feature {NONE} -- Initialization

	make (a_state: NATURAL_8)
			-- Initialization for Current.
		do
			state := a_state
		end
	
feature -- Access

	is_centered: BOOLEAN
			-- True if the position of Current is in the center
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_centered
		end

	is_up: BOOLEAN
			-- True if the position of Current is to the top
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_up
		end

	is_right: BOOLEAN
			-- True if the position of Current is to the right
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_right
		end

	is_down: BOOLEAN
			-- True if the position of Current is to the bottom
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_down
		end

	is_left: BOOLEAN
			-- True if the position of Current is to the left
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_left
		end

	is_right_up: BOOLEAN
			-- True if the position of Current is to the right/up
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_rightup
		end

	is_right_down: BOOLEAN
			-- True if the position of Current is to the right/down
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_rightdown
		end

	is_left_up: BOOLEAN
			-- True if the position of Current is to the left/up
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_leftup
		end

	is_left_down: BOOLEAN
			-- True if the position of Current is to the left/down
		do
			Result := state = {GAME_SDL_EXTERNAL}.sdl_hat_leftdown
		end
	
feature {NONE} -- Implementation

	state: NATURAL_8
			-- Internal identifier representing the state of a Joystick Hat.
	
end -- class GAME_JOYSTICK_HAT_STATE

Generated by ISE EiffelStudio