Compare commits
No commits in common. "29735905332df9e5e18969869e4cddd98d906f51" and "b305041f2888cb0827a9ea8bfaca09f2ae7f427e" have entirely different histories.
2973590533
...
b305041f28
|
@ -1294,12 +1294,7 @@ void LimboAIEditor::_notification(int p_what) {
|
|||
cf.instantiate();
|
||||
String conf_path = PROJECT_CONFIG_FILE();
|
||||
cf->load(conf_path);
|
||||
int split_offset = hsc->get_split_offset();
|
||||
if (editor_layout != (int)EDITOR_GET("limbo_ai/editor/layout")) {
|
||||
// Editor layout settings changed - flip split offset.
|
||||
split_offset *= -1;
|
||||
}
|
||||
cf->set_value("bt_editor", "bteditor_hsplit", split_offset);
|
||||
cf->set_value("bt_editor", "bteditor_hsplit", hsc->get_split_offset());
|
||||
cf->save(conf_path);
|
||||
|
||||
if (task_tree->get_bt().is_valid() &&
|
||||
|
@ -1382,20 +1377,6 @@ LimboAIEditor::LimboAIEditor() {
|
|||
plugin = nullptr;
|
||||
idx_history = 0;
|
||||
|
||||
#ifdef LIMBOAI_MODULE
|
||||
EDITOR_DEF("limbo_ai/editor/layout", 0);
|
||||
EDITOR_SETTINGS()->add_property_hint(PropertyInfo(Variant::INT, "limbo_ai/editor/layout", PROPERTY_HINT_ENUM, "Classic:0,Widescreen Optimized:1"));
|
||||
EDITOR_SETTINGS()->set_restart_if_changed("limbo_ai/editor/layout", true);
|
||||
#elif LIMBOAI_GDEXTENSION
|
||||
EDITOR_SETTINGS()->set_initial_value("limbo_ai/editor/layout", 0, false);
|
||||
Dictionary pinfo;
|
||||
pinfo["name"] = "limbo_ai/editor/layout";
|
||||
pinfo["type"] = Variant::INT;
|
||||
pinfo["hint"] = PROPERTY_HINT_ENUM;
|
||||
pinfo["hint_string"] = "Classic:0,Widescreen Optimized:1";
|
||||
EDITOR_SETTINGS()->add_property_info(pinfo);
|
||||
#endif
|
||||
|
||||
LW_SHORTCUT("limbo_ai/rename_task", TTR("Rename"), LW_KEY(F2));
|
||||
// Todo: Add override support for shortcuts.
|
||||
// LW_SHORTCUT_OVERRIDE("limbo_ai/rename_task", "macos", Key::ENTER);
|
||||
|
@ -1565,8 +1546,8 @@ LimboAIEditor::LimboAIEditor() {
|
|||
task_palette = memnew(TaskPalette());
|
||||
task_palette->hide();
|
||||
hsc->add_child(task_palette);
|
||||
editor_layout = (EditorLayout)(int)EDITOR_GET("limbo_ai/editor/layout");
|
||||
if (editor_layout == EditorLayout::WIDESCREEN_OPTIMIZED) {
|
||||
TaskPalettePlacement palette_placement = (TaskPalettePlacement)(int)EDITOR_GET("limbo_ai/editor/task_palette_placement");
|
||||
if (palette_placement == TaskPalettePlacement::LEFT_SIDE) {
|
||||
VBoxContainer *editor_vbox = memnew(VBoxContainer);
|
||||
hsc->add_child(editor_vbox);
|
||||
toolbar->reparent(editor_vbox);
|
||||
|
@ -1684,6 +1665,9 @@ LimboAIEditor::LimboAIEditor() {
|
|||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "limbo_ai/behavior_tree/user_task_dir_2", PROPERTY_HINT_DIR), "");
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "limbo_ai/behavior_tree/user_task_dir_3", PROPERTY_HINT_DIR), "");
|
||||
|
||||
EDITOR_DEF("limbo_ai/editor/task_palette_placement", 0);
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "limbo_ai/editor/task_palette_placement", PROPERTY_HINT_ENUM, "Right Side:0,Left Side:1"));
|
||||
|
||||
String bt_default_dir = GLOBAL_GET("limbo_ai/behavior_tree/behavior_tree_default_dir");
|
||||
save_dialog->set_current_dir(bt_default_dir);
|
||||
load_dialog->set_current_dir(bt_default_dir);
|
||||
|
|
|
@ -111,9 +111,9 @@ private:
|
|||
TAB_CLOSE_ALL,
|
||||
};
|
||||
|
||||
enum EditorLayout {
|
||||
CLASSIC,
|
||||
WIDESCREEN_OPTIMIZED,
|
||||
enum TaskPalettePlacement {
|
||||
RIGHT_SIDE,
|
||||
LEFT_SIDE,
|
||||
};
|
||||
|
||||
struct ThemeCache {
|
||||
|
@ -137,7 +137,6 @@ private:
|
|||
} theme_cache;
|
||||
|
||||
EditorPlugin *plugin;
|
||||
EditorLayout editor_layout;
|
||||
Vector<Ref<BehaviorTree>> history;
|
||||
int idx_history;
|
||||
bool updating_tabs = false;
|
||||
|
|
Loading…
Reference in New Issue