Hi Martin,
I fear that’s not quite possible with the current version of the BuildEntityButton. When interacting with the BEButton, the signals are forwarded to an invisible (gets visible upon interaction) EntityBaseDraggable, that you can then drag around to determine the spot where to build your Entity. We disabled clicking (selecting) of that Entity, since we only wanted it to get dragged and dropped to the spot where the actual, full functional, Entity gets built afterwards (that’s why you receive the log output).
If i understand you correctly, you are looking for something like selecting a type of entity by clicking the button and then place one after the other on the scene just by clicking? Would it be enough for you if we add a BuildEntityButton clicked signal to give you the information which of the BEButtons was selected, and you add the logic to build the selected entity with a click on the scene yourself?
I was thinking of something like this:
import QtQuick 1.1
import VPlay 1.0
BuildEntityButton {
id: bebutton
width: 50; height: 50
toCreateEntityType: "Block.qml"
Rectangle {
id: rectangle
color: "yellow"
anchors.fill: parent
}
// store the type you want to build somewhere, this can then be used to create an Entity with the EntityManager
onClicked: {
editorScene.selectedEntityType = toCreateEntityType
}
}
Cheers,
Alex