From 272132888f09b9dd4e0b1e519aab5a38380752b2 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Thu, 28 Aug 2008 19:37:49 +0000 Subject: BGE patch: add X-Ray option to ray sensor. The option is effective only if a property is set: the sensor will ignore the objects that don't have the property. --- source/blender/src/buttons_logic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/src/buttons_logic.c') diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index b7ce16f50a6..9b41b646bc8 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1390,9 +1390,14 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short &raySens->propname, 0, 31, 0, 0, "Only look for Objects with this property"); } - + + /* X-Ray option */ + uiDefButBitS(block, TOG, SENS_RAY_XRAY, 1, "X", + xco + 10,yco - 68, 0.10 * (width-20), 19, + &raySens->mode, 0.0, 0.0, 0, 0, + "Toggle X-Ray option (see through objects that don't have the property)"); /* 2. sensing range */ - uiDefButF(block, NUM, 1, "Range", xco+10, yco-68, 0.6 * (width-20), 19, + uiDefButF(block, NUM, 1, "Range", xco+10 + 0.10 * (width-20), yco-68, 0.5 * (width-20), 19, &raySens->range, 0.01, 10000.0, 100, 0, "Sense objects no farther than this distance"); -- cgit v1.2.3