"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

how to change Virtual Buttons action?

Hello Im using the VirtualButoons sample code. i want to change the isPressed action, so the button name will displayed to the screen. i tried to do that by changing the renderFrame function in virtuslButttons.cpp to this code: [CODE] if (button->isPressed()) { jstring js = env->NewStringUTF(button->getName()); jclass javaClass = env->GetObjectClass(obj); jmethodID method = env->GetMethodID(javaClass, "displayMessage", "(Ljava/lang/String;)V"); env->CallVoidMethod(obj, method, js); } [/CODE] however, when pressing buttons a message appear but stay for long time, even after "releasing the button. what did i do wrong?

DavidBeard

Thu, 06/21/2012 - 15:50

I think that you'll need to clear the displayMessage value when button->isPressed() is false. [code] if (button->isPressed()) { jstring js = env->NewStringUTF(button->getName()); jclass javaClass = env->GetObjectClass(obj); jmethodID method = env->GetMethodID(javaClass, "displayMe