limboai/util/limbo_def.cpp

28 lines
799 B
C++
Raw Normal View History

2024-01-07 05:51:34 +00:00
/**
* limbo_def.cpp
* =============================================================================
* Copyright 2021-2023 Serhii Snitsaruk
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/
#include "limbo_def.h"
#include "godot_cpp/classes/editor_interface.hpp"
#ifdef LIMBOAI_GDEXTENSION
#include <godot_cpp/classes/editor_settings.hpp>
using namespace godot;
Variant _EDITOR_GET(const String &p_setting) {
Ref<EditorSettings> es = EditorInterface::get_singleton()->get_editor_settings();
ERR_FAIL_COND_V(es.is_null() || !es->has_setting(p_setting), Variant());
return es->get(p_setting);
}
#endif