diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-08-17 22:17:32 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-08-17 22:17:32 +0200 |
| commit | a4e62c525fdc6b9662cdd48aaef2de7e9376f062 (patch) | |
| tree | b7a872b84ef912af3e7c1e451868144ca8c051a6 /core | |
| parent | 695d9938d9cf4c38bcc408e22f5f72ea1896c42f (diff) | |
| download | turns-a4e62c525fdc6b9662cdd48aaef2de7e9376f062.tar.xz turns-a4e62c525fdc6b9662cdd48aaef2de7e9376f062.zip | |
core: add ::skip-defeated property
Diffstat (limited to 'core')
| -rw-r--r-- | core/include/turns/core/turn_order.hpp | 3 | ||||
| -rw-r--r-- | core/src/turn_order.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/include/turns/core/turn_order.hpp b/core/include/turns/core/turn_order.hpp index 52a7268..5e38d0c 100644 --- a/core/include/turns/core/turn_order.hpp +++ b/core/include/turns/core/turn_order.hpp @@ -36,6 +36,7 @@ namespace turns::core using is_running_type = bool; using progress_type = double; using round_number_type = unsigned int; + using skip_defeated_type = bool; auto static constexpr invalid_participant_index = std::numeric_limits<active_participant_type>::max(); auto static constexpr invalid_round_number = std::numeric_limits<round_number_type>::max(); @@ -53,6 +54,7 @@ namespace turns::core auto is_running() const -> Glib::PropertyProxy_ReadOnly<is_running_type>; auto progress() const -> Glib::PropertyProxy_ReadOnly<progress_type>; auto round_number() const -> Glib::PropertyProxy_ReadOnly<round_number_type>; + auto skip_defeated() -> Glib::PropertyProxy<skip_defeated_type>; /** Element Modifications */ auto add(Glib::ustring const & name, float priority, disposition disposition) -> void; @@ -92,6 +94,7 @@ namespace turns::core Glib::Property<is_running_type> m_is_running{*this, "is-running", false}; Glib::Property<progress_type> m_progress{*this, "progress", 0.0}; Glib::Property<round_number_type> m_round_number{*this, "round-number", invalid_round_number}; + Glib::Property<skip_defeated_type> m_skip_defeated{*this, "skip-defeated", false}; }; } // namespace turns::core diff --git a/core/src/turn_order.cpp b/core/src/turn_order.cpp index 31b6830..a2c4ce5 100644 --- a/core/src/turn_order.cpp +++ b/core/src/turn_order.cpp @@ -93,6 +93,11 @@ namespace turns::core return m_round_number.get_proxy(); } + auto turn_order::skip_defeated() -> Glib::PropertyProxy<skip_defeated_type> + { + return m_skip_defeated.get_proxy(); + } + /** Modifiers */ auto turn_order::add(Glib::ustring const & name, float priority, disposition disposition) -> void |
