You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Adding font preview to file browsers
This commit is contained in:
@@ -140,4 +140,27 @@ public:
|
||||
~EditorMeshPreviewPlugin();
|
||||
};
|
||||
|
||||
class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator {
|
||||
|
||||
GDCLASS(EditorFontPreviewPlugin, EditorResourcePreviewGenerator)
|
||||
|
||||
RID viewport;
|
||||
RID viewport_texture;
|
||||
RID canvas;
|
||||
RID canvas_item;
|
||||
volatile bool preview_done;
|
||||
|
||||
void _preview_done(const Variant &p_udata);
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
virtual bool handles(const String &p_type) const;
|
||||
virtual Ref<Texture> generate(const RES &p_from);
|
||||
virtual Ref<Texture> generate_from_path(const String &p_path);
|
||||
|
||||
EditorFontPreviewPlugin();
|
||||
~EditorFontPreviewPlugin();
|
||||
};
|
||||
#endif // EDITORPREVIEWPLUGINS_H
|
||||
|
||||
Reference in New Issue
Block a user