Posted: 23rd Aug 2011 11:16
So I'm starting to use the virtual buttons as I am at the point in my application where you would set difficulty etc.

The code:
+ Code Snippet
    bNoob.button = AddVirtualButton ( width / 2, height / 2, 200 )
    SetVirtualButtonText ( bNoob.button, "This is a button" )


Is invalid, parameter mismatch through adding the virtual button.

This is strange as it is the method I have been using for all my media.
Why does identification through types not work with Virtual Buttons?
Am I doing something wrong?
Posted: 23rd Aug 2011 12:08
AddVirtualButton requires 4 parameters.

AddVirtualButton( index, x, y, size )

and doesn't return a value (to bNoob.button, in your snippet) so you can skip the "bNoob.button =" part and put the value from it into the index parameter.

The range of "index" must be from 1 to 12, and the value is not one that is auto-generated, like with the media commands.
Posted: 23rd Aug 2011 12:33
The range of "index" must be from 1 to 12, and the value is not one that is auto-generated, like with the media commands.

That's what I was wondering. Thanks for the information!