example browser: slider widget improvements

This commit is contained in:
Lunkhound
2016-11-20 16:38:11 -08:00
parent 936a104fb2
commit 49b27f30bd
10 changed files with 86 additions and 91 deletions

View File

@@ -69,19 +69,19 @@ struct InclinedPlaneExample : public CommonRigidBodyBase
};
void onBoxFrictionChanged(float friction);
void onBoxFrictionChanged(float friction, void* userPtr);
void onBoxRestitutionChanged(float restitution);
void onBoxRestitutionChanged(float restitution, void* userPtr);
void onSphereFrictionChanged(float friction);
void onSphereFrictionChanged(float friction, void* userPtr);
void onSphereRestitutionChanged(float restitution);
void onSphereRestitutionChanged(float restitution, void* userPtr);
void onRampInclinationChanged(float inclination);
void onRampInclinationChanged(float inclination, void* userPtr);
void onRampFrictionChanged(float friction);
void onRampFrictionChanged(float friction, void* userPtr);
void onRampRestitutionChanged(float restitution);
void onRampRestitutionChanged(float restitution, void* userPtr);
void InclinedPlaneExample::initPhysics()
{
@@ -306,35 +306,35 @@ bool InclinedPlaneExample::keyboardCallback(int key, int state) {
// GUI parameter modifiers
void onBoxFrictionChanged(float friction){
void onBoxFrictionChanged(float friction, void*){
if(gBox){
gBox->setFriction(friction);
// b3Printf("Friction of box changed to %f",friction );
}
}
void onBoxRestitutionChanged(float restitution){
void onBoxRestitutionChanged(float restitution, void*){
if(gBox){
gBox->setRestitution(restitution);
//b3Printf("Restitution of box changed to %f",restitution);
}
}
void onSphereFrictionChanged(float friction){
void onSphereFrictionChanged(float friction, void*){
if(gSphere){
gSphere->setFriction(friction);
//b3Printf("Friction of sphere changed to %f",friction );
}
}
void onSphereRestitutionChanged(float restitution){
void onSphereRestitutionChanged(float restitution, void*){
if(gSphere){
gSphere->setRestitution(restitution);
//b3Printf("Restitution of sphere changed to %f",restitution);
}
}
void onRampInclinationChanged(float inclination){
void onRampInclinationChanged(float inclination, void*){
if(ramp){
btTransform startTransform;
startTransform.setIdentity();
@@ -351,14 +351,14 @@ void onRampInclinationChanged(float inclination){
}
}
void onRampFrictionChanged(float friction){
void onRampFrictionChanged(float friction, void*){
if(ramp){
ramp->setFriction(friction);
//b3Printf("Friction of ramp changed to %f \n",friction );
}
}
void onRampRestitutionChanged(float restitution){
void onRampRestitutionChanged(float restitution, void*){
if(ramp){
ramp->setRestitution(restitution);
//b3Printf("Restitution of ramp changed to %f \n",restitution);