Merge pull request #247 from marynate/PR-path-editor-ui
Path Editor UI Improvment
This commit is contained in:
commit
64671eb6fb
File diff suppressed because one or more lines are too long
BIN
tools/editor/icons/icon_curve_close.png
Normal file
BIN
tools/editor/icons/icon_curve_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 591 B |
@ -565,8 +565,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
|
|||||||
curve_del->set_tooltip("Delete Point.");
|
curve_del->set_tooltip("Delete Point.");
|
||||||
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_del);
|
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_del);
|
||||||
curve_close = memnew( ToolButton );
|
curve_close = memnew( ToolButton );
|
||||||
//curve_close->set_icon(SpatialEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
|
curve_close->set_icon(SpatialEditor::get_singleton()->get_icon("CurveClose","EditorIcons"));
|
||||||
curve_close->set_text("close");
|
|
||||||
curve_close->hide();
|
curve_close->hide();
|
||||||
curve_close->set_focus_mode(Control::FOCUS_NONE);
|
curve_close->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_close->set_tooltip("Close Curve");
|
curve_close->set_tooltip("Close Curve");
|
||||||
|
@ -191,7 +191,10 @@ void SpatialGizmoTool::add_handles(const Vector<Vector3> &p_handles, bool p_bill
|
|||||||
a.resize(VS::ARRAY_MAX);
|
a.resize(VS::ARRAY_MAX);
|
||||||
a[VS::ARRAY_VERTEX]=p_handles;
|
a[VS::ARRAY_VERTEX]=p_handles;
|
||||||
mesh->add_surface(Mesh::PRIMITIVE_POINTS,a);
|
mesh->add_surface(Mesh::PRIMITIVE_POINTS,a);
|
||||||
|
if (!p_secondary)
|
||||||
mesh->surface_set_material(0,SpatialEditorGizmos::singleton->handle2_material);
|
mesh->surface_set_material(0,SpatialEditorGizmos::singleton->handle2_material);
|
||||||
|
else
|
||||||
|
mesh->surface_set_material(0,SpatialEditorGizmos::singleton->handle2_secondary_material);
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -2131,6 +2134,9 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
|
|||||||
handle2_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
|
handle2_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
|
||||||
handle2_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
|
handle2_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
|
||||||
|
|
||||||
|
handle2_secondary_material = handle2_material->duplicate();
|
||||||
|
handle2_secondary_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,.5));
|
||||||
|
|
||||||
light_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
|
light_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
|
||||||
light_material->set_flag(Material::FLAG_UNSHADED, true);
|
light_material->set_flag(Material::FLAG_UNSHADED, true);
|
||||||
light_material->set_line_width(3.0);
|
light_material->set_line_width(3.0);
|
||||||
|
@ -332,6 +332,7 @@ class SpatialEditorGizmos {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
Ref<FixedMaterial> handle2_material;
|
Ref<FixedMaterial> handle2_material;
|
||||||
|
Ref<FixedMaterial> handle2_secondary_material;
|
||||||
Ref<FixedMaterial> handle_material;
|
Ref<FixedMaterial> handle_material;
|
||||||
Ref<FixedMaterial> light_material;
|
Ref<FixedMaterial> light_material;
|
||||||
Ref<FixedMaterial> light_material_omni_icon;
|
Ref<FixedMaterial> light_material_omni_icon;
|
||||||
|
Loading…
Reference in New Issue
Block a user