diff options
author | crupest <crupest@outlook.com> | 2018-09-22 00:25:50 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-22 00:25:50 +0800 |
commit | 9e66244ee15aff263716441c54d3cc53f27cddc4 (patch) | |
tree | f2cb20190d51dea8a36a9694d3f260aa9c0fe214 /CruUI/ui/control.h | |
parent | e01800206050a0ed88cc4f4456fa3590021ab66f (diff) | |
download | cru-9e66244ee15aff263716441c54d3cc53f27cddc4.tar.gz cru-9e66244ee15aff263716441c54d3cc53f27cddc4.tar.bz2 cru-9e66244ee15aff263716441c54d3cc53f27cddc4.zip |
Add focus on pressed.
Diffstat (limited to 'CruUI/ui/control.h')
-rw-r--r-- | CruUI/ui/control.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CruUI/ui/control.h b/CruUI/ui/control.h index 44fbdfba..2f23fd21 100644 --- a/CruUI/ui/control.h +++ b/CruUI/ui/control.h @@ -142,6 +142,15 @@ namespace cru bool HasFocus(); + bool IsFocusOnPressed() const + { + return is_focus_on_pressed_; + } + + void SetFocusOnPressed(const bool value) + { + is_focus_on_pressed_ = value; + } //*************** region: layout *************** @@ -329,6 +338,8 @@ namespace cru Size desired_size_ = Size::Zero(); std::unordered_map<String, std::any> additional_properties_{}; + + bool is_focus_on_pressed_ = true; }; // Find the lowest common ancestor. |