Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › Adjust EntityBaseDraggable properties with ItemEditor

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5327

    Martin

    Hey, a typical use case for the ItemEditor would be: drag&drop a level building block (EntityBaseDraggable) into level, e.g. a platform, then adjust its properties (size, rotation, color, …). For this, however, in addition to ItemEditor.currentEditableType, one would also require to specify an ItemEditor.currentEditableEntity.¬†One way to achieve this currently seems by constructing some workaround like a dummy entity with editable properties and then propagate the property changes explicitly to the destined level entity which is a bit cumbersome.

    Maybe I miss something. Please advise. Cheers, Martin

    #5332

    Alex
    Felgo Team

    The problem is, that the ItemEditor is not designed to edit the properties of a specific entity, but of an entityType instead. We will evaluate if we can add your requested feature in the near future.

    Cheers,
    Alex

    #5334

    Martin

    Ok, thanks. We think this is an important feature. The ItemEditor is otherwise of rather limited use which would be a pity.

    As mentioned above, as a workaround I use a proxy Item which propagates property values to the currently selected level entity.

            Item {
                id: platformItem
                property int rotation: 0
                property real length: 1
                EditableComponent {
                    editableType: "platform"
                    properties: {
                        "rotation": {"min":0, "max":360, "stepsize": 10},
                        "length": {"min":0, "max":10, "stepsize": 0.5}
                    }
                }
                onRotationChanged: itemEditor.currentEntityObject.rotation = rotation
                // etc.
            }

    This seems to work fine. However, when a different entity is selected, the values in the ItemEditor should correspond to the actual values of the entity. It is unfortunately not clear to me how to do this since there does not seem to be a binding between the Item with the EditableComponent and the ItemEditor. Simply changing platformItem.rotation won’t change the respective ItemEditor value. Can this be achieved somehow? Otherwise: could you add the functionality? Additionally it would be good if one could disable the type display/selection at the top of the ItemEditor.

    Cheers, Martin

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded