mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2024-11-10 20:12:10 +01:00
28 lines
576 B
C++
28 lines
576 B
C++
#ifndef TEXTFILE_H
|
|
#define TEXTFILE_H
|
|
|
|
/* text_file.h */
|
|
|
|
|
|
#include "core/io/resource_loader.h"
|
|
#include "core/io/resource_saver.h"
|
|
|
|
class TextFile : public Resource {
|
|
GDCLASS(TextFile, Resource);
|
|
|
|
private:
|
|
String text;
|
|
String path;
|
|
|
|
public:
|
|
virtual bool has_text() const;
|
|
virtual String get_text() const;
|
|
virtual void set_text(const String &p_code);
|
|
virtual void reload_from_file();
|
|
|
|
void set_file_path(const String &p_path) { path = p_path; }
|
|
Error load_text(const String &p_path);
|
|
};
|
|
|
|
#endif // TEXTFILE_H
|