#define HAS_DEFAULT_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_default")
#define HAS_TACTICAL_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_tactical")
#define HAS_LEFTY_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_lefty")
#define HAS_DEFAULT_ALT_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_default_alt")
#define HAS_TACTICAL_ALT_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_tactical_alt")
#define HAS_LEFTY_ALT_BUTTONS_XBOX (HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE && dvarString(gpad_buttonConfig) == "buttons_lefty_alt") 

#define HAS_DEFAULT_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_default") 
#define HAS_TACTICAL_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_tactical") 
#define HAS_LEFTY_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_lefty") 
#define HAS_DEFAULT_ALT_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_default_alt")
#define HAS_TACTICAL_ALT_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_tactical_alt")
#define HAS_LEFTY_ALT_BUTTONS_SONY (HAS_SELECTED_BUTTONS && HAS_SONY_STYLE && dvarString(gpad_buttonConfig) == "buttons_lefty_alt") 

// default
#define SET1_BUTTONA_TEXT "@MENU_JUMP"
#define SET1_BUTTONB_TEXT "@MENU_CROUCH_PRONE"
#define SET1_BUTTONX_TEXT "@MENU_USE_RELOAD"
#define SET1_BUTTONY_TEXT "@MENU_SWITCH_WEAPON"
#define SET1_BUTTONBLACK_TEXT "@MENU_THROW_SPECIAL_GRENADE"
#define SET1_BUTTONWHITE_TEXT "@MENU_THROW_FRAG_GRENADE"
#define SET1_BUTTONUP_TEXT ""
#define SET1_BUTTONDOWN_TEXT "@MENU_INVENTORY"
#define SET1_BUTTONLEFT_TEXT ""
#define SET1_BUTTONRIGHT_TEXT ""
#define SET1_BUTTONLTRIG_TEXT "@MENU_AIM_DOWN_SIGHT"
#define SET1_BUTTONRTRIG_TEXT "@MENU_FIRE_WEAPON"
#define SET1_BUTTONSTART_TEXT "@MENU_OBJECTIVES_MENU"
#define SET1_BUTTONBACK_TEXT "@MENU_NOT_USED"
#define SET1_BUTTONLSTICK_TEXT "@MENU_SPRINT"
#define SET1_BUTTONRSTICK_TEXT "@MENU_MELEE_ATTACK"

// experimental
#define SET2_BUTTONA_TEXT "@MENU_JUMP"
#define SET2_BUTTONB_TEXT "@MENU_MELEE_ATTACK"
#define SET2_BUTTONX_TEXT "@MENU_USE_RELOAD"
#define SET2_BUTTONY_TEXT "@MENU_SWITCH_WEAPON"
#define SET2_BUTTONBLACK_TEXT "@MENU_THROW_SPECIAL_GRENADE"
#define SET2_BUTTONWHITE_TEXT "@MENU_THROW_FRAG_GRENADE"
#define SET2_BUTTONUP_TEXT ""
#define SET2_BUTTONDOWN_TEXT "@MENU_INVENTORY"
#define SET2_BUTTONLEFT_TEXT ""
#define SET2_BUTTONRIGHT_TEXT ""
#define SET2_BUTTONLTRIG_TEXT "@MENU_AIM_DOWN_SIGHT"
#define SET2_BUTTONRTRIG_TEXT "@MENU_FIRE_WEAPON"
#define SET2_BUTTONSTART_TEXT "@MENU_OBJECTIVES_MENU"
#define SET2_BUTTONBACK_TEXT "@MENU_NOT_USED"
#define SET2_BUTTONLSTICK_TEXT "@MENU_SPRINT"
#define SET2_BUTTONRSTICK_TEXT "@MENU_CROUCH_PRONE"

// lefty
#define SET3_BUTTONA_TEXT "@MENU_JUMP"
#define SET3_BUTTONB_TEXT "@MENU_CROUCH_PRONE"
#define SET3_BUTTONX_TEXT "@MENU_USE_RELOAD"
#define SET3_BUTTONY_TEXT "@MENU_SWITCH_WEAPON"
#define SET3_BUTTONBLACK_TEXT "@MENU_THROW_FRAG_GRENADE"
#define SET3_BUTTONWHITE_TEXT "@MENU_THROW_SPECIAL_GRENADE"
#define SET3_BUTTONUP_TEXT ""
#define SET3_BUTTONDOWN_TEXT "@MENU_INVENTORY"
#define SET3_BUTTONLEFT_TEXT ""
#define SET3_BUTTONRIGHT_TEXT ""
#define SET3_BUTTONLTRIG_TEXT "@MENU_FIRE_WEAPON"
#define SET3_BUTTONRTRIG_TEXT "@MENU_AIM_DOWN_SIGHT"
#define SET3_BUTTONSTART_TEXT "@MENU_OBJECTIVES_MENU"
#define SET3_BUTTONBACK_TEXT "@MENU_NOT_USED"
#define SET3_BUTTONLSTICK_TEXT "@MENU_SPRINT"
#define SET3_BUTTONRSTICK_TEXT "@MENU_MELEE_ATTACK"

// default alt & experimental alt
#define SET4_AND_5_BUTTONBLACK_TEXT "@MENU_AIM_DOWN_SIGHT" 
#define SET4_AND_5_BUTTONWHITE_TEXT "@MENU_FIRE_WEAPON"
#define SET4_AND_5_BUTTONLTRIG_TEXT "@MENU_THROW_SPECIAL_GRENADE"
#define SET4_AND_5_BUTTONRTRIG_TEXT "@MENU_THROW_FRAG_GRENADE"

// lefty alt
#define SET6_BUTTONBLACK_TEXT "@MENU_FIRE_WEAPON"
#define SET6_BUTTONWHITE_TEXT "@MENU_AIM_DOWN_SIGHT"
#define SET6_BUTTONLTRIG_TEXT "@MENU_THROW_FRAG_GRENADE"
#define SET6_BUTTONRTRIG_TEXT "@MENU_THROW_SPECIAL_GRENADE"

#define BUTTON_ORIGIN				147 150
#define BUTTON_TEXTOFFSET_A			320 198
#define BUTTON_TEXTOFFSET_B			315 153
#define BUTTON_TEXTOFFSET_X			319 176
#define BUTTON_TEXTOFFSET_Y			310 128
#define BUTTON_TEXTOFFSET_BLACK		 52  98
#define BUTTON_TEXTOFFSET_WHITE		295  98 //BUTTON_TEXTOFFSET_WHITE
#define BUTTON_TEXTOFFSET_UP		 28 180
#define BUTTON_TEXTOFFSET_DOWN		160 267
#define BUTTON_TEXTOFFSET_LEFT		 28 180
#define BUTTON_TEXTOFFSET_RIGHT		 20 198
#define BUTTON_TEXTOFFSET_LTRIG		 62  78
#define BUTTON_TEXTOFFSET_RTRIG		288  78
#define BUTTON_TEXTOFFSET_START		160  63
#define BUTTON_TEXTOFFSET_BACK		175  35
#define BUTTON_TEXTOFFSET_LSTICK	 30 148
#define BUTTON_TEXTOFFSET_RSTICK	180 254


#define CONTROLS_BUTTON(visArg, textArg, rectArg, alignArg ) 						\
	itemDef																			\
	{																				\
		type			ITEM_TYPE_TEXT												\
		text			textArg														\
		rect			rectArg 0 0 HORIZONTAL_ALIGN_DEFAULT VERTICAL_ALIGN_DEFAULT	\
		textalign		alignArg													\
		origin			BUTTON_ORIGIN												\
		forecolor		1 1 1 1														\
		textstyle		ITEM_TEXTSTYLE_SHADOWED										\
		textscale		FONTSCALE_SMALL												\
		visible			when (visArg)												\
		decoration																	\
	}

itemDef
{
	style			WINDOW_STYLE_SHADER
	rect			0 0 350 350
	origin			BUTTON_ORIGIN
	background		"xenon_controller_top"
	forecolor		1 1 1 1
	visible			when(HAS_SELECTED_BUTTONS && HAS_XBOX_STYLE)
	decoration
}

itemDef
{
	style			WINDOW_STYLE_SHADER
	rect			0 0 350 350
	origin			BUTTON_ORIGIN
	background		"ps3_controller_top"
	forecolor 		1 1 1 1
	visible			when(HAS_SELECTED_BUTTONS && HAS_SONY_STYLE)
	decoration
}

itemDef
{
	rect 			0 0 350 350
	origin			BUTTON_ORIGIN
	style 			WINDOW_STYLE_SHADER
	background 		"ps3_controller_lines_classic_sp"
	forecolor 		1 1 1 1
	visible 		when(HAS_DEFAULT_BUTTONS_SONY || HAS_TACTICAL_BUTTONS_SONY || HAS_LEFTY_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY)
	decoration
}

itemDef
{
	rect 			0 0 350 350
	origin			BUTTON_ORIGIN
	style 			WINDOW_STYLE_SHADER
	background 		"xenon_controller_lines_classic_mp"
	forecolor 		1 1 1 1
	visible 		when(HAS_DEFAULT_BUTTONS_XBOX || HAS_TACTICAL_BUTTONS_XBOX || HAS_LEFTY_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX)
	decoration
}

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_TACTICAL_BUTTONS_XBOX || HAS_LEFTY_BUTTONS_XBOX ||
HAS_DEFAULT_ALT_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX , SET1_BUTTONA_TEXT, BUTTON_TEXTOFFSET_A, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_TACTICAL_BUTTONS_XBOX || HAS_LEFTY_BUTTONS_XBOX ||
HAS_DEFAULT_ALT_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX , SET1_BUTTONX_TEXT, BUTTON_TEXTOFFSET_X, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_TACTICAL_BUTTONS_XBOX || HAS_LEFTY_BUTTONS_XBOX ||
HAS_DEFAULT_ALT_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX , SET1_BUTTONY_TEXT, BUTTON_TEXTOFFSET_Y, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_TACTICAL_BUTTONS_XBOX || HAS_LEFTY_BUTTONS_XBOX ||
HAS_DEFAULT_ALT_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX , SET1_BUTTONSTART_TEXT, BUTTON_TEXTOFFSET_START, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX, SET1_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX, SET1_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX, SET1_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX, SET1_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_XBOX || HAS_DEFAULT_ALT_BUTTONS_XBOX, SET1_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX, SET2_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX, SET2_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX, SET2_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX, SET2_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_XBOX || HAS_TACTICAL_ALT_BUTTONS_XBOX, SET2_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_XBOX, SET4_AND_5_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX, SET3_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX, SET3_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX, SET3_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX, SET3_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_XBOX || HAS_LEFTY_ALT_BUTTONS_XBOX, SET3_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_XBOX, SET6_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_XBOX, SET6_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_XBOX, SET6_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_XBOX, SET6_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )

#undef BUTTON_ORIGIN
#undef BUTTON_TEXTOFFSET_A
#undef BUTTON_TEXTOFFSET_B
#undef BUTTON_TEXTOFFSET_X
#undef BUTTON_TEXTOFFSET_Y
#undef BUTTON_TEXTOFFSET_BLACK
#undef BUTTON_TEXTOFFSET_WHITE
#undef BUTTON_TEXTOFFSET_UP
#undef BUTTON_TEXTOFFSET_DOWN
#undef BUTTON_TEXTOFFSET_LEFT
#undef BUTTON_TEXTOFFSET_RIGHT
#undef BUTTON_TEXTOFFSET_LTRIG
#undef BUTTON_TEXTOFFSET_RTRIG
#undef BUTTON_TEXTOFFSET_START
#undef BUTTON_TEXTOFFSET_BACK
#undef BUTTON_TEXTOFFSET_LSTICK
#undef BUTTON_TEXTOFFSET_RSTICK

#define BUTTON_ORIGIN				147 150
#define BUTTON_TEXTOFFSET_A			315 225
#define BUTTON_TEXTOFFSET_B			305 180
#define BUTTON_TEXTOFFSET_X			312 200
#define BUTTON_TEXTOFFSET_Y			303 157
#define BUTTON_TEXTOFFSET_BLACK		 57 112
#define BUTTON_TEXTOFFSET_WHITE		302 112
#define BUTTON_TEXTOFFSET_UP		 28 180
#define BUTTON_TEXTOFFSET_DOWN		 35 175
#define BUTTON_TEXTOFFSET_LEFT		 28 180
#define BUTTON_TEXTOFFSET_RIGHT		 20 198
#define BUTTON_TEXTOFFSET_LTRIG		 67  95
#define BUTTON_TEXTOFFSET_RTRIG		295  95
#define BUTTON_TEXTOFFSET_START		160  90
#define BUTTON_TEXTOFFSET_BACK		175  62
#define BUTTON_TEXTOFFSET_LSTICK	 78 217
#define BUTTON_TEXTOFFSET_RSTICK	180 274

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_TACTICAL_BUTTONS_SONY || HAS_LEFTY_BUTTONS_SONY ||
HAS_DEFAULT_ALT_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY , SET1_BUTTONA_TEXT, BUTTON_TEXTOFFSET_A, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_TACTICAL_BUTTONS_SONY || HAS_LEFTY_BUTTONS_SONY ||
HAS_DEFAULT_ALT_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY , SET1_BUTTONX_TEXT, BUTTON_TEXTOFFSET_X, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_TACTICAL_BUTTONS_SONY || HAS_LEFTY_BUTTONS_SONY ||
HAS_DEFAULT_ALT_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY , SET1_BUTTONY_TEXT, BUTTON_TEXTOFFSET_Y, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_TACTICAL_BUTTONS_SONY || HAS_LEFTY_BUTTONS_SONY ||
HAS_DEFAULT_ALT_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY , SET1_BUTTONSTART_TEXT, BUTTON_TEXTOFFSET_START, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY, SET1_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY, SET1_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY, SET1_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY, SET1_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_BUTTONS_SONY || HAS_DEFAULT_ALT_BUTTONS_SONY, SET1_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_DEFAULT_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY, SET2_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY, SET2_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY, SET2_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY, SET2_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_BUTTONS_SONY || HAS_TACTICAL_ALT_BUTTONS_SONY, SET2_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_TACTICAL_ALT_BUTTONS_SONY, SET4_AND_5_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )

CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONB_TEXT, BUTTON_TEXTOFFSET_B, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY, SET3_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY, SET3_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONUP_TEXT, BUTTON_TEXTOFFSET_UP, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONDOWN_TEXT, BUTTON_TEXTOFFSET_DOWN, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONLEFT_TEXT, BUTTON_TEXTOFFSET_LEFT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONRIGHT_TEXT, BUTTON_TEXTOFFSET_RIGHT, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY, SET3_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY, SET3_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONBACK_TEXT, BUTTON_TEXTOFFSET_BACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONLSTICK_TEXT, BUTTON_TEXTOFFSET_LSTICK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_BUTTONS_SONY || HAS_LEFTY_ALT_BUTTONS_SONY, SET3_BUTTONRSTICK_TEXT, BUTTON_TEXTOFFSET_RSTICK, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_SONY, SET6_BUTTONWHITE_TEXT, BUTTON_TEXTOFFSET_WHITE, ITEM_ALIGN_TOP_LEFT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_SONY, SET6_BUTTONBLACK_TEXT, BUTTON_TEXTOFFSET_BLACK, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_SONY, SET6_BUTTONLTRIG_TEXT, BUTTON_TEXTOFFSET_LTRIG, ITEM_ALIGN_TOP_RIGHT )
CONTROLS_BUTTON( HAS_LEFTY_ALT_BUTTONS_SONY, SET6_BUTTONRTRIG_TEXT, BUTTON_TEXTOFFSET_RTRIG, ITEM_ALIGN_TOP_LEFT )