diff options
Diffstat (limited to 'extension/src/openvic-extension/classes/GFXSpriteTexture.cpp')
-rw-r--r-- | extension/src/openvic-extension/classes/GFXSpriteTexture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/classes/GFXSpriteTexture.cpp b/extension/src/openvic-extension/classes/GFXSpriteTexture.cpp index 41bea4b..b81f32e 100644 --- a/extension/src/openvic-extension/classes/GFXSpriteTexture.cpp +++ b/extension/src/openvic-extension/classes/GFXSpriteTexture.cpp @@ -21,6 +21,7 @@ void GFXSpriteTexture::_bind_methods() { OV_BIND_METHOD(GFXSpriteTexture::get_gfx_texture_sprite_name); OV_BIND_METHOD(GFXSpriteTexture::set_icon_index, { "new_icon_index" }); + OV_BIND_METHOD(GFXSpriteTexture::set_toggled_icon, { "toggle" }); OV_BIND_METHOD(GFXSpriteTexture::get_icon_index); OV_BIND_METHOD(GFXSpriteTexture::get_icon_count); @@ -133,3 +134,7 @@ Error GFXSpriteTexture::set_icon_index(int32_t new_icon_index) { _update_button_states(); return OK; } + +Error GFXSpriteTexture::set_toggled_icon(bool toggled) { + return set_icon_index(toggled ? 2 : 1); +} |