diff options
Diffstat (limited to 'extension/src/openvic-extension/singletons/MenuSingleton.hpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/MenuSingleton.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/singletons/MenuSingleton.hpp b/extension/src/openvic-extension/singletons/MenuSingleton.hpp index 190e3ea..022bce5 100644 --- a/extension/src/openvic-extension/singletons/MenuSingleton.hpp +++ b/extension/src/openvic-extension/singletons/MenuSingleton.hpp @@ -1,5 +1,6 @@ #pragma once +#include <godot_cpp/classes/control.hpp> #include <godot_cpp/classes/image.hpp> #include <openvic-simulation/pop/Pop.hpp> @@ -95,6 +96,10 @@ namespace OpenVic { static godot::StringName const& _signal_population_menu_pops_changed(); /* Emitted when the collection of possible search results changes. */ static godot::StringName const& _signal_search_cache_changed(); + /* Emitted when the current tooltip changes. Arguments: text (godot::String), substitution_dict (godot::Dictionary), + * position (godot::Vector2). If text is empty then the tooltip will be hidden, otherwise the text will be shown at + * the given position. */ + static godot::StringName const& _signal_update_tooltip(); godot::String get_state_name(State const& state) const; godot::String get_country_name(CountryInstance const& country) const; @@ -110,6 +115,15 @@ namespace OpenVic { MenuSingleton(); ~MenuSingleton(); + /* TOOLTIP */ + void show_tooltip( + godot::String const& text, godot::Dictionary const& substitution_dict, godot::Vector2 const& position + ); + void show_control_tooltip( + godot::String const& text, godot::Dictionary const& substitution_dict, godot::Control const* control + ); + void hide_tooltip(); + /* PROVINCE OVERVIEW PANEL */ /* Get info to display in Province Overview Panel, packaged in a Dictionary using StringName constants as keys. */ godot::Dictionary get_province_info_from_index(int32_t index) const; |