From 8a98ebf0ed92ba8e52ef535b2e65009d235b9ecc Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 15 Jul 2022 19:48:25 +0200 Subject: [PATCH] Removed the Icon Loader. --- modules/text_editor/iconloader.cpp | 35 ------------------------------ modules/text_editor/iconloader.h | 22 ------------------- 2 files changed, 57 deletions(-) delete mode 100644 modules/text_editor/iconloader.cpp delete mode 100644 modules/text_editor/iconloader.h diff --git a/modules/text_editor/iconloader.cpp b/modules/text_editor/iconloader.cpp deleted file mode 100644 index 24ac42436..000000000 --- a/modules/text_editor/iconloader.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -#include "iconloader.h" - - - - //tool; - - ImageTexture IconLoader::load_icon_from_name(const String &icon_name) { - File *file = File.new(); - Ref image = Image.new(); - Ref texture = ImageTexture.new(); - file.open("res://addons/file-editor/icons.pngs/"+icon_name+".png.buttonicon", File.READ); - PoolByteArray buffer = file.get_buffer(file.get_len()); - file.close(); - image.load_png_from_buffer(buffer); - texture.create_from_image(image); - return texture; -} - -} - - IconLoader::IconLoader() { - } - - IconLoader::~IconLoader() { - } - - - static void IconLoader::_bind_methods() { - ClassDB::bind_method(D_METHOD("load_icon_from_name", "icon_name"), &IconLoader::load_icon_from_name); - - } - - - diff --git a/modules/text_editor/iconloader.h b/modules/text_editor/iconloader.h deleted file mode 100644 index 17cc3aa63..000000000 --- a/modules/text_editor/iconloader.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef ICONLOADER_H -#define ICONLOADER_H - - -class IconLoader : public Node { - GDCLASS(IconLoader, Node); - - public: - - ImageTexture load_icon_from_name(const String &icon_name); - - IconLoader(); - ~IconLoader(); - - protected: - static void _bind_methods(); - - //tool -}; - - -#endif