Graphics 1024,768,0,2AppTitle "Xinput Demo by bloos_magoos"While Not KeyHit(1) Cls ;Test left stick Text 0,120,"Left Stick X - "+Int(X360_LeftStickX(0)) Text 0,130,"Left Stick Y - " + Int(X360_LeftStickY(0)) Oval 0,0,100,100,0 Oval 50+X360_LeftStickX(0)*50,50+X360_LeftStickY(0)*50,1,1,1 ;Right Text 200,120,"Right Stick X - "+Int(X360_RightStickX(0)) Text 200,130,"Right Stick Y - " + Int(X360_RightStickY(0)) Oval 100,0,100,100,0 Oval 150+X360_RightStickX(0)/4,50+X360_RightStickY(0)/4,1,1,1 Text 300,50,"<--- THEY LOOK LIKE BOOBS (.)(.)" Text 300,60,"Right Analog Stick Graphic is not exact because the func returns a 180 instead of 1" Line 0,180,1024,180 ;separator ;/////// ;testing triggers ;right Rect 50,200,50,10,0 Rect 50,200,50,Int(-X360_ReturnTrigger(0)*10),1 ;Left Rect 0,200,50,10,0 Rect 0,200,50,Int(X360_ReturnTrigger(0)*10),1 Text 0,230,"NOTICE - - Pressing both triggers makes trigger axis return zero :(" Text 0,250,"Trigger Axis ->" +Int(X360_ReturnTrigger(0)) Line 0,300,1024,300 ;separator ;//////// ;Buttons If Not X360_AButtonDown(0) Text 0,310,"A" Else Text 0,310,">>A<<" EndIf If Not X360_BButtonDown(0) Text 0,320,"B" Else Text 0,320,">>B<<" EndIf If Not X360_XButtonDown(0) Text 0,330,"X" Else Text 0,330,">>X<<" EndIf If Not X360_YButtonDown(0) Text 0,340,"Y" Else Text 0,340,">>Y<<" EndIf If Not X360_RBButtonDown(0) Text 0,360,"Right Bumper" Else Text 0,360,">>Right Bumper<<" EndIf If Not X360_LBButtonDown(0) Text 0,370,"Left Bumper" Else Text 0,370,">>Left Bumper<<" EndIf If Not X360_LStickButtonDown(0) Text 0,390,"Left Stick" Else Text 0,390,">>Left Stick<<" EndIf If Not X360_RStickButtonDown(0) Text 0,400,"Right Stick" Else Text 0,400,">>Right Stick<<" EndIf If Not X360_StartButtonDown(0) Text 0,420,"Start" Else Text 0,420,">>Start<<" EndIf If Not X360_BackButtonDown(0) Text 0,430,"Back" Else Text 0,430,">>Back<<" EndIf Line 0,450,1024,450 ;separator ;//////////// ;Dpad dir=X360_DPadDir(0) Text 0,500,"D-PAD" If dir=1 Text 0,520,"^" EndIf If dir=2 Text 0,520,"^ + >" EndIf If dir=3 Text 0,520,">" EndIf If dir=4 Text 0,520,"v + >" EndIf If dir=5 Text 0,520,"v" EndIf If dir=6 Text 0,520,"v + <" EndIf If dir=7 Text 0,520,"<" EndIf If dir=8 Text 0,520,"^ + <" EndIf If dir=0 Text 0,520," - - " EndIf If dir=-1 RuntimeError "Something happened I guess" EndIf FlipWend