libsuit  0.1.1
SFML User Interface Toolkit
Public Member Functions | List of all members
ui::MouseButtonControl Class Reference

A mouse button control. More...

#include <ui/Control.h>

Inheritance diagram for ui::MouseButtonControl:
Inheritance graph
[legend]

Public Member Functions

 MouseButtonControl (sf::Mouse::Button button)
 Construct a mouse button control. More...
 
virtual void update (const sf::Event &event) override
 Update the state of the control thanks to an event. More...
 
- Public Member Functions inherited from ui::Control
 Control (std::string name, std::string controller_name)
 Construct a control with a name and its controller name. More...
 
virtual ~Control ()
 Destroy the control. More...
 
bool isActive ()
 Tell whether the control is active. More...
 
void setActive (bool active=true)
 Change the active state of the control. More...
 
void reset ()
 Desactivate the control. More...
 

Detailed Description

A mouse button control.

Constructor & Destructor Documentation

ui::MouseButtonControl::MouseButtonControl ( sf::Mouse::Button  button)

Construct a mouse button control.

Parameters
buttonthe button of the mouse.

Member Function Documentation

virtual void ui::MouseButtonControl::update ( const sf::Event &  event)
overridevirtual

Update the state of the control thanks to an event.

Parameters
eventthe event to update the control.
See also
Action::update()

Implements ui::Control.