aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/classes/GUIIcon.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic-extension/classes/GUIIcon.hpp')
-rw-r--r--extension/src/openvic-extension/classes/GUIIcon.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/classes/GUIIcon.hpp b/extension/src/openvic-extension/classes/GUIIcon.hpp
new file mode 100644
index 0000000..e8e3014
--- /dev/null
+++ b/extension/src/openvic-extension/classes/GUIIcon.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "openvic-extension/classes/GFXSpriteTexture.hpp"
+#include "openvic-extension/classes/GUITextureRect.hpp"
+
+namespace OpenVic {
+ class GUIIcon : public GUITextureRect {
+ GDCLASS(GUIIcon, GUITextureRect)
+
+ godot::Ref<GFXSpriteTexture> gfx_sprite_texture;
+
+ protected:
+ static void _bind_methods();
+
+ public:
+ godot::Error set_gfx_texture_sprite(
+ GFX::TextureSprite const* gfx_texture_sprite, GFX::frame_t icon = GFX::NO_FRAMES
+ );
+
+ godot::Ref<GFXSpriteTexture> get_gfx_sprite_texture() const;
+
+ godot::Error set_gfx_texture_sprite_name(
+ godot::String const& gfx_texture_sprite_name, GFX::frame_t icon = GFX::NO_FRAMES
+ );
+
+ godot::String get_gfx_texture_sprite_name() const;
+
+ godot::Error set_icon_index(GFX::frame_t icon_index) const;
+
+ GFX::frame_t get_icon_index() const;
+
+ godot::Error set_toggled_icon(bool toggled) const;
+ };
+}