You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Removed ratio anchoring (will have to fix multiple 3D views later..)
This commit is contained in:
@@ -116,31 +116,8 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) {
|
|||||||
|
|
||||||
String name= p_name;
|
String name= p_name;
|
||||||
if (!name.begins_with("custom")) {
|
if (!name.begins_with("custom")) {
|
||||||
if (name.begins_with("margin/")) {
|
|
||||||
String dname = name.get_slicec('/', 1);
|
|
||||||
if (dname == "left") {
|
|
||||||
set_margin(MARGIN_LEFT, p_value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "top") {
|
|
||||||
set_margin(MARGIN_TOP, p_value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "right") {
|
|
||||||
set_margin(MARGIN_RIGHT, p_value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "bottom") {
|
|
||||||
set_margin(MARGIN_BOTTOM, p_value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_value.get_type()==Variant::NIL) {
|
if (p_value.get_type()==Variant::NIL) {
|
||||||
|
|
||||||
@@ -235,30 +212,8 @@ bool Control::_get(const StringName& p_name,Variant &r_ret) const {
|
|||||||
String sname=p_name;
|
String sname=p_name;
|
||||||
|
|
||||||
if (!sname.begins_with("custom")) {
|
if (!sname.begins_with("custom")) {
|
||||||
if (sname.begins_with("margin/")) {
|
|
||||||
String dname = sname.get_slicec('/', 1);
|
|
||||||
if (dname == "left") {
|
|
||||||
r_ret = get_margin(MARGIN_LEFT);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "top") {
|
|
||||||
r_ret = get_margin(MARGIN_TOP);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "right") {
|
|
||||||
r_ret = get_margin(MARGIN_RIGHT);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (dname == "bottom") {
|
|
||||||
r_ret = get_margin(MARGIN_BOTTOM);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sname.begins_with("custom_icons/")) {
|
if (sname.begins_with("custom_icons/")) {
|
||||||
@@ -295,36 +250,6 @@ bool Control::_get(const StringName& p_name,Variant &r_ret) const {
|
|||||||
}
|
}
|
||||||
void Control::_get_property_list( List<PropertyInfo> *p_list) const {
|
void Control::_get_property_list( List<PropertyInfo> *p_list) const {
|
||||||
|
|
||||||
{
|
|
||||||
if (get_anchor(MARGIN_LEFT) == ANCHOR_RATIO) {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::REAL, "margin/left", PROPERTY_HINT_RANGE, "-4096,4096,0.001"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "margin/left", PROPERTY_HINT_RANGE, "-4096,4096"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_anchor(MARGIN_TOP) == ANCHOR_RATIO) {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::REAL, "margin/top", PROPERTY_HINT_RANGE, "-4096,4096,0.001"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "margin/top", PROPERTY_HINT_RANGE, "-4096,4096"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_anchor(MARGIN_RIGHT) == ANCHOR_RATIO) {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::REAL, "margin/right", PROPERTY_HINT_RANGE, "-4096,4096,0.001"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "margin/right", PROPERTY_HINT_RANGE, "-4096,4096"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_anchor(MARGIN_BOTTOM) == ANCHOR_RATIO) {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::REAL, "margin/bottom", PROPERTY_HINT_RANGE, "-4096,4096,0.001"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "margin/bottom", PROPERTY_HINT_RANGE, "-4096,4096"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref<Theme> theme;
|
Ref<Theme> theme;
|
||||||
if (data.theme.is_valid()) {
|
if (data.theme.is_valid()) {
|
||||||
|
|
||||||
@@ -1258,10 +1183,6 @@ void Control::_size_changed() {
|
|||||||
|
|
||||||
margin_pos[i]=area-data.margin[i];
|
margin_pos[i]=area-data.margin[i];
|
||||||
} break;
|
} break;
|
||||||
case ANCHOR_RATIO: {
|
|
||||||
|
|
||||||
margin_pos[i]=area*data.margin[i];
|
|
||||||
} break;
|
|
||||||
case ANCHOR_CENTER: {
|
case ANCHOR_CENTER: {
|
||||||
|
|
||||||
margin_pos[i]=(area/2)-data.margin[i];
|
margin_pos[i]=(area/2)-data.margin[i];
|
||||||
@@ -1334,9 +1255,6 @@ float Control::_s2a(float p_val, AnchorType p_anchor,float p_range) const {
|
|||||||
case ANCHOR_END: {
|
case ANCHOR_END: {
|
||||||
return p_range-p_val;
|
return p_range-p_val;
|
||||||
} break;
|
} break;
|
||||||
case ANCHOR_RATIO: {
|
|
||||||
return p_val/p_range;
|
|
||||||
} break;
|
|
||||||
case ANCHOR_CENTER: {
|
case ANCHOR_CENTER: {
|
||||||
return (p_range/2)-p_val;
|
return (p_range/2)-p_val;
|
||||||
} break;
|
} break;
|
||||||
@@ -1356,9 +1274,6 @@ float Control::_a2s(float p_val, AnchorType p_anchor,float p_range) const {
|
|||||||
case ANCHOR_END: {
|
case ANCHOR_END: {
|
||||||
return Math::floor(p_range-p_val);
|
return Math::floor(p_range-p_val);
|
||||||
} break;
|
} break;
|
||||||
case ANCHOR_RATIO: {
|
|
||||||
return Math::floor(p_range*p_val);
|
|
||||||
} break;
|
|
||||||
case ANCHOR_CENTER: {
|
case ANCHOR_CENTER: {
|
||||||
return Math::floor((p_range/2)-p_val);
|
return Math::floor((p_range/2)-p_val);
|
||||||
} break;
|
} break;
|
||||||
@@ -2565,10 +2480,16 @@ void Control::_bind_methods() {
|
|||||||
BIND_VMETHOD(MethodInfo("drop_data",PropertyInfo(Variant::VECTOR2,"pos"),PropertyInfo(Variant::NIL,"data")));
|
BIND_VMETHOD(MethodInfo("drop_data",PropertyInfo(Variant::VECTOR2,"pos"),PropertyInfo(Variant::NIL,"data")));
|
||||||
|
|
||||||
ADD_GROUP("Anchor","anchor_");
|
ADD_GROUP("Anchor","anchor_");
|
||||||
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_left", PROPERTY_HINT_ENUM, "Begin,End,Ratio,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_LEFT );
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_left", PROPERTY_HINT_ENUM, "Begin,End,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_LEFT );
|
||||||
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_top", PROPERTY_HINT_ENUM, "Begin,End,Ratio,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_TOP );
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_top", PROPERTY_HINT_ENUM, "Begin,End,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_TOP );
|
||||||
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_right", PROPERTY_HINT_ENUM, "Begin,End,Ratio,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_RIGHT );
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_right", PROPERTY_HINT_ENUM, "Begin,End,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_RIGHT );
|
||||||
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_bottom", PROPERTY_HINT_ENUM, "Begin,End,Ratio,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_BOTTOM );
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"anchor_bottom", PROPERTY_HINT_ENUM, "Begin,End,Center"), _SCS("_set_anchor"),_SCS("get_anchor"), MARGIN_BOTTOM );
|
||||||
|
|
||||||
|
ADD_GROUP("Margin","margin_");
|
||||||
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"margin_left", PROPERTY_HINT_RANGE, "-4096,4096"), _SCS("set_margin"),_SCS("get_margin"),MARGIN_LEFT );
|
||||||
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"margin_top", PROPERTY_HINT_RANGE, "-4096,4096"), _SCS("set_margin"),_SCS("get_margin"),MARGIN_TOP );
|
||||||
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"margin_right", PROPERTY_HINT_RANGE, "-4096,4096"), _SCS("set_margin"),_SCS("get_margin"),MARGIN_RIGHT );
|
||||||
|
ADD_PROPERTYINZ( PropertyInfo(Variant::INT,"margin_bottom", PROPERTY_HINT_RANGE, "-4096,4096"), _SCS("set_margin"),_SCS("get_margin"),MARGIN_BOTTOM );
|
||||||
|
|
||||||
ADD_GROUP("Rect","rect_");
|
ADD_GROUP("Rect","rect_");
|
||||||
ADD_PROPERTYNZ( PropertyInfo(Variant::VECTOR2,"rect_pos", PROPERTY_HINT_NONE, "",PROPERTY_USAGE_EDITOR), _SCS("set_pos"),_SCS("get_pos") );
|
ADD_PROPERTYNZ( PropertyInfo(Variant::VECTOR2,"rect_pos", PROPERTY_HINT_NONE, "",PROPERTY_USAGE_EDITOR), _SCS("set_pos"),_SCS("get_pos") );
|
||||||
@@ -2577,6 +2498,7 @@ void Control::_bind_methods() {
|
|||||||
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"rect_rotation",PROPERTY_HINT_RANGE,"-1080,1080,0.01"), _SCS("set_rotation_deg"),_SCS("get_rotation_deg") );
|
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"rect_rotation",PROPERTY_HINT_RANGE,"-1080,1080,0.01"), _SCS("set_rotation_deg"),_SCS("get_rotation_deg") );
|
||||||
ADD_PROPERTYNO( PropertyInfo(Variant::VECTOR2,"rect_scale"), _SCS("set_scale"),_SCS("get_scale") );
|
ADD_PROPERTYNO( PropertyInfo(Variant::VECTOR2,"rect_scale"), _SCS("set_scale"),_SCS("get_scale") );
|
||||||
|
|
||||||
|
|
||||||
ADD_GROUP("Hint","hint_");
|
ADD_GROUP("Hint","hint_");
|
||||||
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"hint_tooltip", PROPERTY_HINT_MULTILINE_TEXT), _SCS("set_tooltip"),_SCS("_get_tooltip") );
|
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"hint_tooltip", PROPERTY_HINT_MULTILINE_TEXT), _SCS("set_tooltip"),_SCS("_get_tooltip") );
|
||||||
|
|
||||||
@@ -2598,7 +2520,6 @@ void Control::_bind_methods() {
|
|||||||
|
|
||||||
BIND_CONSTANT( ANCHOR_BEGIN );
|
BIND_CONSTANT( ANCHOR_BEGIN );
|
||||||
BIND_CONSTANT( ANCHOR_END );
|
BIND_CONSTANT( ANCHOR_END );
|
||||||
BIND_CONSTANT( ANCHOR_RATIO );
|
|
||||||
BIND_CONSTANT( ANCHOR_CENTER );
|
BIND_CONSTANT( ANCHOR_CENTER );
|
||||||
BIND_CONSTANT( FOCUS_NONE );
|
BIND_CONSTANT( FOCUS_NONE );
|
||||||
BIND_CONSTANT( FOCUS_CLICK );
|
BIND_CONSTANT( FOCUS_CLICK );
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ public:
|
|||||||
enum AnchorType {
|
enum AnchorType {
|
||||||
ANCHOR_BEGIN,
|
ANCHOR_BEGIN,
|
||||||
ANCHOR_END,
|
ANCHOR_END,
|
||||||
ANCHOR_RATIO,
|
|
||||||
ANCHOR_CENTER,
|
ANCHOR_CENTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "call_dialog.h"
|
#include "call_dialog.h"
|
||||||
|
|
||||||
|
#if 0
|
||||||
#include "scene/gui/label.h"
|
#include "scene/gui/label.h"
|
||||||
#include "object_type_db.h"
|
#include "object_type_db.h"
|
||||||
#include "print_string.h"
|
#include "print_string.h"
|
||||||
@@ -268,7 +269,6 @@ CallDialog::CallDialog() {
|
|||||||
|
|
||||||
tree = memnew( Tree );
|
tree = memnew( Tree );
|
||||||
|
|
||||||
tree->set_anchor( MARGIN_RIGHT, ANCHOR_RATIO );
|
|
||||||
tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
|
tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
|
||||||
tree->set_begin( Point2( 20,50 ) );
|
tree->set_begin( Point2( 20,50 ) );
|
||||||
tree->set_margin(MARGIN_BOTTOM, 44 );
|
tree->set_margin(MARGIN_BOTTOM, 44 );
|
||||||
@@ -283,7 +283,7 @@ CallDialog::CallDialog() {
|
|||||||
|
|
||||||
property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
|
property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
|
||||||
property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 );
|
property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 );
|
||||||
property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
|
// property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
|
||||||
property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 );
|
property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 );
|
||||||
property_editor->get_scene_tree()->set_hide_root( true );
|
property_editor->get_scene_tree()->set_hide_root( true );
|
||||||
property_editor->hide_top_label();
|
property_editor->hide_top_label();
|
||||||
@@ -296,21 +296,21 @@ CallDialog::CallDialog() {
|
|||||||
add_child(method_label);
|
add_child(method_label);
|
||||||
|
|
||||||
Label *label = memnew( Label );
|
Label *label = memnew( Label );
|
||||||
label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
|
//label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
|
||||||
label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 );
|
label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 );
|
||||||
label->set_text(TTR("Arguments:"));
|
label->set_text(TTR("Arguments:"));
|
||||||
|
|
||||||
add_child(label);
|
add_child(label);
|
||||||
|
|
||||||
return_label = memnew( Label );
|
return_label = memnew( Label );
|
||||||
return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
|
//return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
|
||||||
return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 85 );
|
return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 85 );
|
||||||
return_label->set_text(TTR("Return:"));
|
return_label->set_text(TTR("Return:"));
|
||||||
|
|
||||||
add_child(return_label);
|
add_child(return_label);
|
||||||
|
|
||||||
return_value = memnew( LineEdit );
|
return_value = memnew( LineEdit );
|
||||||
return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
|
//return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
|
||||||
return_value->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
|
return_value->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
|
||||||
return_value->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 65 );
|
return_value->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 65 );
|
||||||
|
|
||||||
@@ -338,3 +338,4 @@ CallDialog::~CallDialog()
|
|||||||
{
|
{
|
||||||
memdelete(call_params);
|
memdelete(call_params);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
@author Juan Linietsky <reduzio@gmail.com>
|
@author Juan Linietsky <reduzio@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
class CallDialogParams;
|
class CallDialogParams;
|
||||||
|
|
||||||
@@ -81,3 +82,4 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -2638,12 +2638,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
_set_editing_top_editors(current);
|
_set_editing_top_editors(current);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case OBJECT_CALL_METHOD: {
|
|
||||||
|
|
||||||
editor_data.apply_changes_in_editors();;
|
|
||||||
call_dialog->set_object(current);
|
|
||||||
call_dialog->popup_centered_ratio();
|
|
||||||
} break;
|
|
||||||
case RUN_PLAY: {
|
case RUN_PLAY: {
|
||||||
_menu_option_confirm(RUN_STOP,true);
|
_menu_option_confirm(RUN_STOP,true);
|
||||||
_call_build();
|
_call_build();
|
||||||
@@ -6346,9 +6340,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
call_dialog = memnew( CallDialog );
|
|
||||||
call_dialog->hide();
|
|
||||||
gui_base->add_child( call_dialog );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ private:
|
|||||||
OBJECT_COPY_PARAMS,
|
OBJECT_COPY_PARAMS,
|
||||||
OBJECT_PASTE_PARAMS,
|
OBJECT_PASTE_PARAMS,
|
||||||
OBJECT_UNIQUE_RESOURCES,
|
OBJECT_UNIQUE_RESOURCES,
|
||||||
OBJECT_CALL_METHOD,
|
|
||||||
OBJECT_REQUEST_HELP,
|
OBJECT_REQUEST_HELP,
|
||||||
RUN_PLAY,
|
RUN_PLAY,
|
||||||
|
|
||||||
@@ -287,7 +286,7 @@ private:
|
|||||||
|
|
||||||
CreateDialog *create_dialog;
|
CreateDialog *create_dialog;
|
||||||
|
|
||||||
CallDialog *call_dialog;
|
// CallDialog *call_dialog;
|
||||||
ConfirmationDialog *confirmation;
|
ConfirmationDialog *confirmation;
|
||||||
ConfirmationDialog *import_confirmation;
|
ConfirmationDialog *import_confirmation;
|
||||||
ConfirmationDialog *open_recent_confirmation;
|
ConfirmationDialog *open_recent_confirmation;
|
||||||
|
|||||||
@@ -2963,9 +2963,9 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
viewports[0]->set_area_as_parent_rect();
|
viewports[0]->set_area_as_parent_rect();
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_area_as_parent_rect();
|
viewports[2]->set_area_as_parent_rect();
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
|
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), true );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), true );
|
||||||
@@ -2987,9 +2987,9 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
viewports[0]->set_area_as_parent_rect();
|
viewports[0]->set_area_as_parent_rect();
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_area_as_parent_rect();
|
viewports[2]->set_area_as_parent_rect();
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
||||||
|
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
||||||
@@ -3009,13 +3009,13 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||||||
viewports[i]->show();
|
viewports[i]->show();
|
||||||
}
|
}
|
||||||
viewports[0]->set_area_as_parent_rect();
|
viewports[0]->set_area_as_parent_rect();
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_area_as_parent_rect();
|
viewports[2]->set_area_as_parent_rect();
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
viewports[3]->set_area_as_parent_rect();
|
viewports[3]->set_area_as_parent_rect();
|
||||||
viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
//viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
||||||
viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
|
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
||||||
@@ -3035,13 +3035,13 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||||||
viewports[i]->show();
|
viewports[i]->show();
|
||||||
}
|
}
|
||||||
viewports[0]->set_area_as_parent_rect();
|
viewports[0]->set_area_as_parent_rect();
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_area_as_parent_rect();
|
viewports[2]->set_area_as_parent_rect();
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[3]->set_area_as_parent_rect();
|
viewports[3]->set_area_as_parent_rect();
|
||||||
viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
//viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
||||||
|
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
||||||
@@ -3058,17 +3058,17 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||||||
viewports[i]->show();
|
viewports[i]->show();
|
||||||
}
|
}
|
||||||
viewports[0]->set_area_as_parent_rect();
|
viewports[0]->set_area_as_parent_rect();
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
//viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
||||||
viewports[1]->set_area_as_parent_rect();
|
viewports[1]->set_area_as_parent_rect();
|
||||||
viewports[1]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
//viewports[1]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
||||||
viewports[1]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
//viewports[1]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_area_as_parent_rect();
|
viewports[2]->set_area_as_parent_rect();
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
|
||||||
viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
viewports[3]->set_area_as_parent_rect();
|
viewports[3]->set_area_as_parent_rect();
|
||||||
viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
//viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
|
||||||
viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
//viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
|
||||||
|
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
|
||||||
|
|||||||
Reference in New Issue
Block a user