8 #ifndef SRC_FOCUSACTION_HPP_ 9 #define SRC_FOCUSACTION_HPP_ 11 #include "HaveAction.hpp" 12 #include "HaveHover.hpp" 16 const char*
const gain =
"gainfocus";
17 const char*
const lost =
"lostfocus";
20 const char*
const on =
"onhover";
21 const char*
const gain =
"gainhover";
22 const char*
const lost =
"losthover";
36 virtual bool update(sf::Vector2f mp = sf::Vector2f(0.f,0.f),
bool pressLeft =
false,
bool pressRight =
false,
bool aboveHover =
false) {
37 bool lastHover = hover;
39 if(!aboveHover && visible) {
40 updateHover(mp, this->clippedArea);
48 this->doAction(ActionType::Hover::on);
50 this->doAction(ActionType::Hover::gain);
54 this->doAction(ActionType::Hover::lost);
58 return hover | aboveHover;
60 virtual void onFocusGain() {
61 this->doAction(ActionType::Focus::gain);
63 virtual void onFocusLost() {
64 this->doAction(ActionType::Focus::lost);
Definition: HaveHover.hpp:16
Definition: Checkbox.hpp:13
Definition: HaveAction.hpp:33
Definition: Element.hpp:22
Definition: FocusAction.hpp:27