1682
1684
if(sa->sound) {
1683
1685
char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4";
1684
uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,width-40,19, sa->sound->id.name+2, 0.0, 18.0, 0, 0, "");
1686
uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,width-40,19, sa->sound->id.name+2, 0.0, 21.0, 0, 0, "");
1685
1687
uiDefButS(block, MENU, 1, dummy_str,xco+10,yco-44,width-20, 19, &sa->type, 0.0, 0.0, 0, 0, "");
1686
1688
uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-66,wval, 19, &sa->sound->volume, 0.0, 1.0, 0, 0, "Sets the volume of this sound");
1687
1689
uiDefButF(block, NUM, 0, "Pitch:",xco+wval+10,yco-66,wval, 19, &sa->sound->pitch,-12.0, 12.0, 0, 0, "Sets the pitch of this sound");
2389
2391
"Motion defined by laws of physics");
2391
2393
if(ob->gameflag & OB_DYNAMIC) {
2392
uiDefButBitI(block, TOG, OB_RIGID_BODY, B_REDR, "Rigid Body", 180,205,70,19,
2394
uiDefButBitI(block, TOG, OB_RIGID_BODY, B_REDR, "Rigid Body", 190,205,80,19,
2393
2395
&ob->gameflag, 0, 0, 0, 0,
2394
2396
"Enable rolling physics");
2395
uiDefButBitI(block, TOG, OB_COLLISION_RESPONSE, B_REDR, "No sleeping", 250,205,100,19,
2397
uiDefButBitI(block, TOG, OB_COLLISION_RESPONSE, B_REDR, "No sleeping", 270,205,80,19,
2396
2398
&ob->gameflag, 0, 0, 0, 0,
2397
2399
"Disable auto (de)activation");
2440
//if (!(ob->gameflag & OB_GHOST))
2441
//Ghost can be any bound type in Bullet
2442
if (!(ob->gameflag & OB_GHOST)) {
2443
2443
uiBlockBeginAlign(block);
2444
2444
uiDefButBitI(block, TOG, OB_BOUNDS, B_REDR, "Bounds", 10, 125, 75, 19,
2445
2445
&ob->gameflag, 0, 0,0, 0,
2446
2446
"Specify a bounds object for physics");
2447
2447
if (ob->gameflag & OB_BOUNDS) {
2448
2448
uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Convex Hull Polytope%x5|Static TriangleMesh %x4",
2449
//almost ready to enable this one: uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Convex Hull Polytope%x5|Static TriangleMesh %x4|Dynamic Mesh %x5|",
2450
2449
85, 125, 160, 19, &ob->boundtype, 0, 0, 0, 0, "Selects the collision type");
2451
2450
uiDefButBitI(block, TOG, OB_CHILD, B_REDR, "Compound", 250,125,100,19,
2452
2451
&ob->gameflag, 0, 0, 0, 0,
2458
void buttons_bullet(uiBlock *block, Object *ob)
2460
uiBlockBeginAlign(block);
2461
uiDefButBitI(block, TOG, OB_ACTOR, B_REDR, "Actor",
2462
10,205,55,19, &ob->gameflag, 0, 0, 0, 0,
2463
"Objects that are evaluated by the engine ");
2464
if(ob->gameflag & OB_ACTOR) {
2465
uiDefButBitI(block, TOG, OB_GHOST, B_REDR, "Ghost", 65,205,55,19,
2466
&ob->gameflag, 0, 0, 0, 0,
2467
"Objects that don't restitute collisions (like a ghost)");
2468
uiDefButBitI(block, TOG, OB_DYNAMIC, B_REDR, "Dynamic", 120,205,70,19,
2469
&ob->gameflag, 0, 0, 0, 0,
2470
"Motion defined by laws of physics");
2472
if(ob->gameflag & OB_DYNAMIC) {
2473
uiDefButBitI(block, TOG, OB_RIGID_BODY, B_REDR, "Rigid Body", 190,205,80,19,
2474
&ob->gameflag, 0, 0, 0, 0,
2475
"Enable rolling physics");
2476
uiDefButBitI(block, TOG, OB_COLLISION_RESPONSE, B_REDR, "No sleeping", 270,205,80,19,
2477
&ob->gameflag, 0, 0, 0, 0,
2478
"Disable auto (de)activation");
2480
uiDefButF(block, NUM, B_DIFF, "Mass:", 10, 185, 170, 19,
2481
&ob->mass, 0.01, 10000.0, 10, 2,
2482
"The mass of the Object");
2483
uiDefButF(block, NUM, REDRAWVIEW3D, "Radius:", 180, 185, 170, 19,
2484
&ob->inertia, 0.01, 10.0, 10, 2,
2485
"Bounding sphere radius");
2487
uiDefButF(block, NUMSLI, B_DIFF, "Damp ", 10, 165, 150, 19,
2488
&ob->damping, 0.0, 1.0, 10, 0,
2489
"General movement damping");
2490
uiDefButF(block, NUMSLI, B_DIFF, "RotDamp ", 160, 165, 190, 19,
2491
&ob->rdamping, 0.0, 1.0, 10, 0,
2492
"General rotation damping");
2495
uiBlockEndAlign(block);
2497
uiBlockBeginAlign(block);
2498
uiDefButBitI(block, TOG, OB_BOUNDS, B_REDR, "Bounds", 10, 125, 75, 19,
2499
&ob->gameflag, 0, 0,0, 0,
2500
"Specify a bounds object for physics");
2501
if (ob->gameflag & OB_BOUNDS) {
2502
uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Convex Hull Polytope%x5|Static TriangleMesh %x4",
2503
//almost ready to enable this one: uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Convex Hull Polytope%x5|Static TriangleMesh %x4|Dynamic Mesh %x5|",
2504
85, 125, 160, 19, &ob->boundtype, 0, 0, 0, 0, "Selects the collision type");
2505
uiDefButBitI(block, TOG, OB_CHILD, B_REDR, "Compound", 250,125,100,19,
2506
&ob->gameflag, 0, 0, 0, 0,
2509
uiBlockEndAlign(block);
2459
2512
/* never used, see CVS 1.134 for the code */
2460
2513
/* static FreeCamera *new_freecamera(void) */
2510
2571
prop= ob->prop.first;
2511
// uiBlockBeginAlign(block);
2513
uiBlockBeginAlign(block);
2514
but= uiDefBut(block, BUT, 1, "Del", 10, (short)(70-20*a), 40, 19, NULL, 0.0, 0.0, 1, (float)a, "");
2573
but= uiDefBut(block, BUT, 1, "Del", 10, (short)(70-20*a), 40, 20, NULL, 0.0, 0.0, 1, (float)a, "");
2515
2574
uiButSetFunc(but, del_property, prop, NULL);
2516
uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(70-20*a), 60, 19, &prop->type, 0, 0, 0, 0, "");
2517
but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(70-20*a), 105, 19, prop->name, 0, 31, 0, 0, "");
2575
uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(70-20*a), 60, 20, &prop->type, 0, 0, 0, 0, "");
2576
but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(70-20*a), 110, 20, prop->name, 0, 31, 0, 0, "");
2518
2577
uiButSetFunc(but, make_unique_prop_names_cb, prop->name, (void*) 1);
2520
2579
if (strcmp(prop->name, "Text") == 0) {
2526
2585
if(prop->type==PROP_BOOL) {
2527
uiDefButBitI(block, TOG, 1, B_REDR, "True", 215, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
2528
uiDefButBitI(block, TOGN, 1, B_REDR, "False", 270, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
2586
uiDefButBitI(block, TOG, 1, B_REDR, "True", 220, (short)(70-20*a), 55, 20, &prop->data, 0, 0, 0, 0, "");
2587
uiDefButBitI(block, TOGN, 1, B_REDR, "False", 270, (short)(70-20*a), 55, 20, &prop->data, 0, 0, 0, 0, "");
2530
2589
else if(prop->type==PROP_INT)
2531
uiDefButI(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, "");
2590
uiDefButI(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, &prop->data, -10000, 10000, 0, 0, "");
2532
2591
else if(prop->type==PROP_FLOAT)
2533
uiDefButF(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 100, 3, "");
2592
uiDefButF(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 100, 3, "");
2534
2593
else if(prop->type==PROP_STRING)
2535
uiDefBut(block, TEX, butreturn, "", 215, (short)(70-20*a), 110, 19, prop->poin, 0, 127, 0, 0, "");
2594
uiDefBut(block, TEX, butreturn, "", 220, (short)(70-20*a), 110, 20, prop->poin, 0, 127, 0, 0, "");
2536
2595
else if(prop->type==PROP_TIME)
2537
uiDefButF(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 0, 0, "");
2596
uiDefButF(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 0, 0, "");
2539
uiDefButBitS(block, TOG, PROP_DEBUG, 0, "D", 325, (short)(70-20*a), 20, 19, &prop->flag, 0, 0, 0, 0, "Print Debug info");
2540
uiBlockEndAlign(block);
2598
uiDefButBitS(block, TOG, PROP_DEBUG, 0, "D", 330, (short)(70-20*a), 20, 20, &prop->flag, 0, 0, 0, 0, "Print Debug info");
2543
2601
prop= prop->next;
2546
// uiBlockEndAlign(block);
2547
// Note: something is wrong with alignment... it attempts to align the next buttons now? will check later...
2604
uiBlockEndAlign(block);
2548
2606
uiClearButLock();
2550
2608
idar= get_selected_and_linked_obs(&count, G.buts->scaflag);