diff options
Diffstat (limited to 'include/cru')
-rw-r--r-- | include/cru/platform/GraphBase.hpp | 6 | ||||
-rw-r--r-- | include/cru/platform/gui/InputMethod.hpp | 3 | ||||
-rw-r--r-- | include/cru/ui/DebugFlags.hpp | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp index 6700765e..2b40898e 100644 --- a/include/cru/platform/GraphBase.hpp +++ b/include/cru/platform/GraphBase.hpp @@ -22,6 +22,12 @@ struct Point final { return fmt::format(u"({}, {})", ToUtf16String(x), ToUtf16String(y)); } + constexpr Point& operator+=(const Point& other) { + this->x += other.x; + this->y += other.y; + return *this; + } + float x = 0; float y = 0; }; diff --git a/include/cru/platform/gui/InputMethod.hpp b/include/cru/platform/gui/InputMethod.hpp index 53a8d671..9d090eab 100644 --- a/include/cru/platform/gui/InputMethod.hpp +++ b/include/cru/platform/gui/InputMethod.hpp @@ -37,7 +37,8 @@ struct IInputMethodContext : virtual INativeResource { virtual CompositionText GetCompositionText() = 0; - // Set the candidate window lefttop. Use this method to prepare typing. + // Set the candidate window lefttop. Relative to window lefttop. Use this + // method to prepare typing. virtual void SetCandidateWindowPosition(const Point& point) = 0; // Triggered when user starts composition. diff --git a/include/cru/ui/DebugFlags.hpp b/include/cru/ui/DebugFlags.hpp index fceef081..7c600d48 100644 --- a/include/cru/ui/DebugFlags.hpp +++ b/include/cru/ui/DebugFlags.hpp @@ -4,5 +4,5 @@ namespace cru::ui::debug_flags { constexpr bool routed_event = false; constexpr bool layout = false; constexpr bool shortcut = false; -constexpr bool text_service = false; +constexpr bool text_service = true; } // namespace cru::ui::debug_flags |