Removed the Icon Loader.

This commit is contained in:
Relintai 2022-07-15 19:48:25 +02:00
parent 3f304192f4
commit 8a98ebf0ed
2 changed files with 0 additions and 57 deletions

View File

@ -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 = Image.new();
Ref<ImageTexture> 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);
}

View File

@ -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