diff options
author | hop311 <hop3114@gmail.com> | 2024-02-24 14:17:07 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-02-24 14:17:07 +0100 |
commit | 843edde55306e3fbdb5e37ef9b7c09c7b53f50c4 (patch) | |
tree | 487fea19d42106c08b60f5bba99bc76485073002 /extension/src/openvic-extension/classes/GUINode.cpp | |
parent | 5d7c6eafe35e2c6e952bc0b3f91d27d760c8e75e (diff) |
Added GUIScrollbar and GFXCorneredTileSupportingTexturescrollbar
Diffstat (limited to 'extension/src/openvic-extension/classes/GUINode.cpp')
-rw-r--r-- | extension/src/openvic-extension/classes/GUINode.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/classes/GUINode.cpp b/extension/src/openvic-extension/classes/GUINode.cpp index a038df7..5296ad7 100644 --- a/extension/src/openvic-extension/classes/GUINode.cpp +++ b/extension/src/openvic-extension/classes/GUINode.cpp @@ -17,7 +17,8 @@ using namespace OpenVic; F(Panel, panel) \ F(TextureProgressBar, progress_bar) \ F(TextureRect, texture_rect) \ - F(GUIOverlappingElementsBox, gui_overlapping_elements_box) + F(GUIOverlappingElementsBox, gui_overlapping_elements_box) \ + F(GUIScrollbar, gui_scrollbar) #define APPLY_TO_TEXTURE_TYPES(F) \ F(GFXSpriteTexture, gfx_sprite_texture) \ @@ -44,6 +45,9 @@ void GUINode::_bind_methods() { OV_BIND_METHOD(GUINode::hide_node, { "path" }); OV_BIND_METHOD(GUINode::hide_nodes, { "paths" }); + + OV_BIND_SMETHOD(int_to_formatted_string, { "val" }); + OV_BIND_SMETHOD(float_to_formatted_string, { "val", "decimal_places" }); } GUINode::GUINode() { @@ -177,3 +181,11 @@ Error GUINode::hide_nodes(TypedArray<NodePath> const& paths) const { } return ret; } + +String GUINode::int_to_formatted_string(int64_t val) { + return Utilities::int_to_formatted_string(val); +} + +String GUINode::float_to_formatted_string(float val, int32_t decimal_places) { + return Utilities::float_to_formatted_string(val, decimal_places); +} |