Forums

OverviewV-Play 1 Supportdynamically sized EntityBaseDraggable Objects › Reply To: dynamically sized EntityBaseDraggable Objects

OverviewV-Play 1 Supportdynamically sized EntityBaseDraggable Objects › Reply To: dynamically sized EntityBaseDraggable Objects
#4415

Christian
V-Play Team

Hi Stephan,

please note, that the createdEntity only modifies the internally created entity that gets used for dragging, which is not the same that gets created after you release the entity and build a new one. To set the properties of the newly created entity, you can use the creationProperties property of BuildEntityButton.

Add the following code to your BallPreview.qml:

BuildEntityButton {

    id: ballPreview
    toCreateEntityType: "../shapes/Ball.qml"
    width: 20
    height: 20

    property int shapeWidth: 20
    property int shapeHeight: 20

    creationProperties: {
     "sWidth": shapeWidth,
     "sHeight": shapeHeight
    }
}

...
}

Cheers, Chris

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support