Implement Navigation layers
This commit is contained in:
@@ -417,7 +417,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
|
||||
updating = false;
|
||||
return false;
|
||||
|
||||
} else if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || hint == PROPERTY_HINT_LAYERS_2D_RENDER || hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
|
||||
} else if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS ||
|
||||
hint == PROPERTY_HINT_LAYERS_2D_RENDER ||
|
||||
hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_PHYSICS ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_RENDER ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) {
|
||||
String basename;
|
||||
switch (hint) {
|
||||
case PROPERTY_HINT_LAYERS_2D_RENDER:
|
||||
@@ -426,12 +431,18 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
|
||||
case PROPERTY_HINT_LAYERS_2D_PHYSICS:
|
||||
basename = "layer_names/2d_physics";
|
||||
break;
|
||||
case PROPERTY_HINT_LAYERS_2D_NAVIGATION:
|
||||
basename = "layer_names/2d_navigation";
|
||||
break;
|
||||
case PROPERTY_HINT_LAYERS_3D_RENDER:
|
||||
basename = "layer_names/3d_render";
|
||||
break;
|
||||
case PROPERTY_HINT_LAYERS_3D_PHYSICS:
|
||||
basename = "layer_names/3d_physics";
|
||||
break;
|
||||
case PROPERTY_HINT_LAYERS_3D_NAVIGATION:
|
||||
basename = "layer_names/3d_navigation";
|
||||
break;
|
||||
}
|
||||
|
||||
checks20gc->show();
|
||||
@@ -1153,7 +1164,12 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
|
||||
emit_signal("variant_changed");
|
||||
} break;
|
||||
case Variant::INT: {
|
||||
if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || hint == PROPERTY_HINT_LAYERS_2D_RENDER || hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
|
||||
if (hint == PROPERTY_HINT_LAYERS_2D_PHYSICS ||
|
||||
hint == PROPERTY_HINT_LAYERS_2D_RENDER ||
|
||||
hint == PROPERTY_HINT_LAYERS_2D_NAVIGATION ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_PHYSICS ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_RENDER ||
|
||||
hint == PROPERTY_HINT_LAYERS_3D_NAVIGATION) {
|
||||
uint32_t f = v;
|
||||
if (checks20[p_which]->is_pressed()) {
|
||||
f |= (1 << p_which);
|
||||
|
||||
Reference in New Issue
Block a user