aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility/Utilities.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-08-15 01:13:54 +0200
committer hop311 <hop3114@gmail.com>2024-08-15 01:13:54 +0200
commit7c85ab11e840c281a2499dcc6dd3219c33e7d37f (patch)
tree84460d9e4c3af8656604add874fc9a379a0adc4a /extension/src/openvic-extension/utility/Utilities.hpp
parent82b16bcca7c74607a8885b882ec36f5202e7ef70 (diff)
Add GUITextLabel (colour code + currency icon support)
Diffstat (limited to 'extension/src/openvic-extension/utility/Utilities.hpp')
-rw-r--r--extension/src/openvic-extension/utility/Utilities.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.hpp b/extension/src/openvic-extension/utility/Utilities.hpp
index 49314ca..48be1e0 100644
--- a/extension/src/openvic-extension/utility/Utilities.hpp
+++ b/extension/src/openvic-extension/utility/Utilities.hpp
@@ -27,6 +27,9 @@ namespace OpenVic::Utilities {
godot::String float_to_string_dp(float val, int32_t decimal_places);
+ // 3dp if abs(val) < 2 else 2dp if abs(val) < 10 else 1dp
+ godot::String float_to_string_dp_dynamic(float val);
+
constexpr real_t to_real_t(std::floating_point auto val) {
return static_cast<real_t>(val);
}