You can use the GetTrigger() function. Something like this:
Code:
Joystick *stick;
stick = new Joystick(1);
if (stick->GetTrigger())
{
// Code if trigger is held
}
else
{
// Code if trigger is released
}
Buttons are similar, but you use the GetRawButton() command.
Code:
Joystick *stick;
stick = new Joystick(1);
if (stick->GetRawButton(1-11))
{
// Code if button is held
}
else if (!stick->GetRawButton(1-11))
{
// Code if button is released
}