mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-05-08 23:01:36 +02:00
Automatically load sessions when HTTPSessionManagerFile enters tree.
This commit is contained in:
parent
45f2f77a58
commit
ebd3280443
@ -163,6 +163,20 @@ HTTPSessionManagerFile::HTTPSessionManagerFile() {
|
|||||||
HTTPSessionManagerFile::~HTTPSessionManagerFile() {
|
HTTPSessionManagerFile::~HTTPSessionManagerFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HTTPSessionManagerFile::_notification(int p_what) {
|
||||||
|
switch (p_what) {
|
||||||
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
|
if (Engine::get_singleton()->is_editor_hint()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
load_sessions();
|
||||||
|
} break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HTTPSessionManagerFile::_bind_methods() {
|
void HTTPSessionManagerFile::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_save_folder_path"), &HTTPSessionManagerFile::get_save_folder_path);
|
ClassDB::bind_method(D_METHOD("get_save_folder_path"), &HTTPSessionManagerFile::get_save_folder_path);
|
||||||
ClassDB::bind_method(D_METHOD("set_save_folder_path", "val"), &HTTPSessionManagerFile::set_save_folder_path);
|
ClassDB::bind_method(D_METHOD("set_save_folder_path", "val"), &HTTPSessionManagerFile::set_save_folder_path);
|
||||||
|
@ -54,6 +54,7 @@ public:
|
|||||||
~HTTPSessionManagerFile();
|
~HTTPSessionManagerFile();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
String _save_folder_path;
|
String _save_folder_path;
|
||||||
|
Loading…
Reference in New Issue
Block a user