|
RType
|
#include <InputComponent.hpp>


Public Member Functions | |
| InputComponent (ClientCore *core, std::shared_ptr< ClientSocket > socket) | |
| Construct a new Input Component object. More... | |
| void | action () override |
| action, call the callback function More... | |
| void | setTexture (const sf::Texture &texture) |
| setTexture set the texture of the component More... | |
| void | setPosition (sf::Vector2f position) |
| setPosition set the position of the component More... | |
| void | setSize (sf::Vector2f size) |
| setSize set the size of the component More... | |
| void | setRect (sf::IntRect rect) |
| setRect set the rect of the component More... | |
| void | setIsClicked (bool isClicked) |
| setIsClicked, set the isClicked of the component More... | |
| void | display (sf::RenderWindow &window) override |
| display display the component More... | |
| sf::IntRect | getRect () const |
| getRect get the rect of the component More... | |
| void | handleEvent (const sf::Event &event, sf::RenderWindow &window) override |
| handleEvent, handle the event More... | |
| void | handleClick () |
| handleClick, handle the click More... | |
| void | setText () |
| setText, set the text of the component More... | |
| std::string | getText () |
| getText, get the text of the component More... | |
Public Member Functions inherited from AComponent | |
| AComponent (ClientCore *clientCore) | |
| AComponent, constructor of AComponent. More... | |
| ~AComponent () override=default | |
| ~AComponent, destructor of AComponent More... | |
| ComponentType | getType () const override |
| getType, get the type of the component More... | |
| void | addActionTarget (std::shared_ptr< IComponent > component) override |
| addActionTarget, add a target to the action More... | |
| void | addSubComponent (std::shared_ptr< IComponent > component) override |
| addSubComponent, add a sub component More... | |
| void | setAttribute (std::string attribute) override |
| setAttribute, set the attribute More... | |
| std::string | getAttribute () override |
| getAttribute, get the attribute More... | |
Public Member Functions inherited from IComponent | |
| IComponent (ClientCore *clientCore) | |
| IComponent, constructor of IComponent. More... | |
| virtual | ~IComponent ()=default |
| ~IComponent, destructor of IComponent More... | |
Public Attributes | |
| std::string | _textEntry |
Additional Inherited Members | |
Protected Attributes inherited from IComponent | |
| std::string | _attribute |
| ComponentType | _type |
| std::vector< std::shared_ptr< IComponent > > | action_target |
| std::vector< std::shared_ptr< IComponent > > | sub_components |
| ClientCore * | _clientCore |
Definition at line 13 of file InputComponent.hpp.
|
explicit |
Construct a new Input Component object.
InputComponent constructor.
| core | |
| socket |
Definition at line 17 of file InputComponent.cpp.
References IComponent::_attribute, _textEntry, IComponent::_type, AComponent::AComponent(), and INPUT.

|
overridevirtual |
action, call the callback function
Implements IComponent.
Definition at line 45 of file InputComponent.cpp.
|
overridevirtual |
display display the component
| window |
Implements IComponent.
Definition at line 98 of file InputComponent.cpp.
| sf::IntRect InputComponent::getRect | ( | ) | const |
getRect get the rect of the component
getRect get the texture of the component
Definition at line 108 of file InputComponent.cpp.
| std::string InputComponent::getText | ( | ) |
getText, get the text of the component
getText get the text of the component
Definition at line 124 of file InputComponent.cpp.
References _textEntry.
| void InputComponent::handleClick | ( | ) |
handleClick, handle the click
|
overridevirtual |
handleEvent, handle the event
handleEvent handle the event of the component
| event | |
| window |
Implements IComponent.
Definition at line 143 of file InputComponent.cpp.
References _textEntry, and setText().

| void InputComponent::setIsClicked | ( | bool | isClicked | ) |
setIsClicked, set the isClicked of the component
SetIsClicked set the isClicked of the component.
| isClicked |
Definition at line 133 of file InputComponent.cpp.
| void InputComponent::setPosition | ( | sf::Vector2f | position | ) |
setPosition set the position of the component
| position |
Definition at line 64 of file InputComponent.cpp.
| void InputComponent::setRect | ( | sf::IntRect | rect | ) |
setRect set the rect of the component
| rect |
Definition at line 88 of file InputComponent.cpp.
| void InputComponent::setSize | ( | sf::Vector2f | size | ) |
setSize set the size of the component
| size |
Definition at line 78 of file InputComponent.cpp.
| void InputComponent::setText | ( | ) |
setText, set the text of the component
setText set the text of the component
Definition at line 116 of file InputComponent.cpp.
Referenced by handleEvent().

| void InputComponent::setTexture | ( | const sf::Texture & | texture | ) |
setTexture set the texture of the component
| texture |
Definition at line 54 of file InputComponent.cpp.
| std::string InputComponent::_textEntry |
Definition at line 104 of file InputComponent.hpp.
Referenced by getText(), handleEvent(), and InputComponent().