aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/GameSingleton.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-05-16 22:15:25 +0200
committer GitHub <noreply@github.com>2024-05-16 22:15:25 +0200
commit963a4a84a0cb6990f4542eafa0b8a82cfc032834 (patch)
tree1ee38ce3be0325752f89e72062aea51d54747a70 /extension/src/openvic-extension/singletons/GameSingleton.cpp
parentbfccdb87d66304604ad018037db1581746646bfa (diff)
parent14a2b79f261091dede324f972f9c7841974c9a2a (diff)
Merge pull request #230 from OpenVicProject/misc
Misc UI code changes
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r--extension/src/openvic-extension/singletons/GameSingleton.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/singletons/GameSingleton.cpp b/extension/src/openvic-extension/singletons/GameSingleton.cpp
index ef19a6c..9f080b5 100644
--- a/extension/src/openvic-extension/singletons/GameSingleton.cpp
+++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp
@@ -69,6 +69,7 @@ void GameSingleton::_bind_methods() {
OV_BIND_METHOD(GameSingleton::is_parchment_mapmode_allowed);
OV_BIND_METHOD(GameSingleton::get_selected_province_index);
OV_BIND_METHOD(GameSingleton::set_selected_province, { "index" });
+ OV_BIND_METHOD(GameSingleton::unset_selected_province);
OV_BIND_METHOD(GameSingleton::try_tick);
@@ -321,6 +322,10 @@ void GameSingleton::set_selected_province(int32_t index) {
emit_signal(_signal_province_selected(), index);
}
+void GameSingleton::unset_selected_province() {
+ set_selected_province(Province::NULL_INDEX);
+}
+
void GameSingleton::try_tick() {
game_manager.get_simulation_clock().conditionally_advance_game();
}