mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 20:57:18 +01:00
Removed the Icon Loader.
This commit is contained in:
parent
3f304192f4
commit
8a98ebf0ed
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user