Skip to content

Commit

Permalink
doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Jun 13, 2018
1 parent f2a4b76 commit 04f0a23
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/gui/sdl_mapper.cpp
Expand Up @@ -2051,27 +2051,39 @@ class CJAxisEvent : public CContinuousEvent {
CJAxisEvent * opposite_axis;
};

//! \brief Joystick button trigger
class CJButtonEvent : public CTriggeredEvent {
public:
//! \brief Constructor, describing mapper event, joystick, and which button
CJButtonEvent(char const * const _entry,Bitu _stick,Bitu _button) : CTriggeredEvent(_entry) {
stick=_stick;
button=_button;
notify_button=NULL;
}

virtual ~CJButtonEvent() {}

virtual void Active(bool pressed) {
if (notify_button != NULL)
notify_button->SetInvert(pressed);

virtual_joysticks[stick].button_pressed[button]=pressed;
active=pressed;
}

//! \brief Associate this object with a text button in the mapper UI
void notifybutton(CTextButton *n) {
notify_button = n;
}

//! \brief Text button in the mapper UI to indicate our status by
CTextButton *notify_button;
protected:
Bitu stick,button;
//! \brief Which joystick
Bitu stick;

//! \brief Which button
Bitu button;
};

//! \brief Joystick hat event
Expand Down

0 comments on commit 04f0a23

Please sign in to comment.