mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 20:36:53 +01:00
Added a VSeparator to the To Prop editor buttons.
This commit is contained in:
parent
72119a0ec0
commit
201d6aa8e7
@ -30,6 +30,7 @@ SOFTWARE.
|
||||
|
||||
#include "scene/gui/separator.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
void PropEditorPlugin::convert_active_scene_to_prop_data() {
|
||||
SceneTree *st = SceneTree::get_singleton();
|
||||
@ -101,14 +102,18 @@ PropEditorPlugin::PropEditorPlugin(EditorNode *p_node) {
|
||||
editor->add_tool_menu_item("Convert selected scene(s) to PropData", this, "convert_selected_scene_to_prop_data");
|
||||
editor->add_tool_menu_item("(Prop) Find room points.", this, "find_room_points");
|
||||
|
||||
HBoxContainer *bc = memnew(HBoxContainer);
|
||||
bc->add_child(memnew(VSeparator));
|
||||
|
||||
Button *b = memnew(Button);
|
||||
bc->add_child(b);
|
||||
b->set_flat(true);
|
||||
|
||||
b->connect("pressed", this, "_quick_convert_button_pressed");
|
||||
b->set_text("To Prop");
|
||||
b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to PropData.", KEY_MASK_ALT + KEY_U));
|
||||
|
||||
add_control_to_container(EditorPlugin::CONTAINER_SPATIAL_EDITOR_MENU, b);
|
||||
add_control_to_container(EditorPlugin::CONTAINER_SPATIAL_EDITOR_MENU, bc);
|
||||
}
|
||||
|
||||
PropEditorPlugin::~PropEditorPlugin() {
|
||||
|
@ -24,9 +24,11 @@ SOFTWARE.
|
||||
|
||||
#include "../props/prop_2d_data.h"
|
||||
#include "../singleton/prop_2d_utils.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "core/input/input.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
|
||||
void Prop2DEditorPlugin::convert_active_scene_to_prop_data() {
|
||||
SceneTree *st = SceneTree::get_singleton();
|
||||
@ -98,14 +100,18 @@ Prop2DEditorPlugin::Prop2DEditorPlugin(EditorNode *p_node) {
|
||||
editor->add_tool_menu_item("Convert selected scene(s) to Prop2DData", this, "convert_selected_scene_to_prop_data");
|
||||
editor->add_tool_menu_item("(Prop2D) Find room points.", this, "find_room_points");
|
||||
|
||||
HBoxContainer *bc = memnew(HBoxContainer);
|
||||
bc->add_child(memnew(VSeparator));
|
||||
|
||||
Button *b = memnew(Button);
|
||||
bc->add_child(b);
|
||||
b->set_flat(true);
|
||||
|
||||
b->connect("pressed", this, "_quick_convert_button_pressed");
|
||||
b->set_text("To Prop2D");
|
||||
b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to Prop2DData.", KEY_MASK_ALT + KEY_U));
|
||||
|
||||
add_control_to_container(EditorPlugin::CONTAINER_CANVAS_EDITOR_MENU, b);
|
||||
add_control_to_container(EditorPlugin::CONTAINER_CANVAS_EDITOR_MENU, bc);
|
||||
}
|
||||
|
||||
Prop2DEditorPlugin::~Prop2DEditorPlugin() {
|
||||
|
Loading…
Reference in New Issue
Block a user