Merge b305041f28
into 4d0d2c0507
This commit is contained in:
commit
c58829c3b7
|
@ -12,7 +12,7 @@ config_version=5
|
||||||
|
|
||||||
config/name="LimboAI Demo"
|
config/name="LimboAI Demo"
|
||||||
run/main_scene="res://demo/scenes/showcase.tscn"
|
run/main_scene="res://demo/scenes/showcase.tscn"
|
||||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||||
config/icon="res://demo/assets/icon.svg"
|
config/icon="res://demo/assets/icon.svg"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
|
@ -1544,9 +1544,20 @@ LimboAIEditor::LimboAIEditor() {
|
||||||
usage_hint->add_child(usage_label);
|
usage_hint->add_child(usage_label);
|
||||||
|
|
||||||
task_palette = memnew(TaskPalette());
|
task_palette = memnew(TaskPalette());
|
||||||
hsc->set_split_offset(-300);
|
|
||||||
task_palette->hide();
|
task_palette->hide();
|
||||||
hsc->add_child(task_palette);
|
hsc->add_child(task_palette);
|
||||||
|
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);
|
||||||
|
tab_bar_panel->reparent(editor_vbox);
|
||||||
|
task_tree->reparent(editor_vbox);
|
||||||
|
usage_hint->reparent(editor_vbox);
|
||||||
|
hsc->set_split_offset(300);
|
||||||
|
} else {
|
||||||
|
hsc->set_split_offset(-300);
|
||||||
|
}
|
||||||
|
|
||||||
change_type_popup = memnew(PopupPanel);
|
change_type_popup = memnew(PopupPanel);
|
||||||
add_child(change_type_popup);
|
add_child(change_type_popup);
|
||||||
|
@ -1654,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_2", PROPERTY_HINT_DIR), "");
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "limbo_ai/behavior_tree/user_task_dir_3", 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");
|
String bt_default_dir = GLOBAL_GET("limbo_ai/behavior_tree/behavior_tree_default_dir");
|
||||||
save_dialog->set_current_dir(bt_default_dir);
|
save_dialog->set_current_dir(bt_default_dir);
|
||||||
load_dialog->set_current_dir(bt_default_dir);
|
load_dialog->set_current_dir(bt_default_dir);
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#include "core/object/object.h"
|
#include "core/object/object.h"
|
||||||
#include "core/templates/hash_set.h"
|
#include "core/templates/hash_set.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/plugins/editor_plugin.h"
|
|
||||||
#include "editor/gui/editor_spin_slider.h"
|
#include "editor/gui/editor_spin_slider.h"
|
||||||
|
#include "editor/plugins/editor_plugin.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/control.h"
|
#include "scene/gui/control.h"
|
||||||
#include "scene/gui/dialogs.h"
|
#include "scene/gui/dialogs.h"
|
||||||
|
@ -111,6 +111,11 @@ private:
|
||||||
TAB_CLOSE_ALL,
|
TAB_CLOSE_ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TaskPalettePlacement {
|
||||||
|
RIGHT_SIDE,
|
||||||
|
LEFT_SIDE,
|
||||||
|
};
|
||||||
|
|
||||||
struct ThemeCache {
|
struct ThemeCache {
|
||||||
Ref<Texture2D> duplicate_task_icon;
|
Ref<Texture2D> duplicate_task_icon;
|
||||||
Ref<Texture2D> edit_script_icon;
|
Ref<Texture2D> edit_script_icon;
|
||||||
|
|
Loading…
Reference in New Issue