Forums

OverviewV-Play 1 SupportBuildEntityButton clicking › Reply To: BuildEntityButton clicking

OverviewV-Play 1 SupportBuildEntityButton clicking › Reply To: BuildEntityButton clicking
#5977

Alex
V-Play Team

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

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