| 356 | } |
| 357 | |
| 358 | void GuiParticleGraphCtrl::insertPlotPoint(S32 plotID, S32 i, Point2F v) |
| 359 | { |
| 360 | //AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!"); |
| 361 | |
| 362 | // Add the data and trim the vector... |
| 363 | mPlots[plotID].mGraphData.insert( i ); |
| 364 | mPlots[plotID].mGraphData[ i ] = v; |
| 365 | |
| 366 | if(mAutoMax == true) |
| 367 | { |
| 368 | // Keep record of maximum data value for scaling purposes. |
| 369 | if(v.y > mPlots[plotID].mGraphMax.y) |
| 370 | mPlots[plotID].mGraphMax.y = v.y; |
| 371 | |
| 372 | if(v.x > mPlots[plotID].mGraphMax.x) |
| 373 | mPlots[plotID].mGraphMax.x = v.x; |
| 374 | } |
| 375 | |
| 376 | // Argument Buffer. |
| 377 | char argBuffer[2][32]; |
| 378 | |
| 379 | dSprintf(argBuffer[0], 32, "%d", plotID); |
| 380 | dSprintf(argBuffer[1], 32, "%f %f", v.x, v.y); |
| 381 | |
| 382 | // Call Scripts. |
| 383 | Con::executef(this, "onPlotPointInserted", argBuffer[0], argBuffer[1]); |
| 384 | } |
| 385 | |
| 386 | S32 GuiParticleGraphCtrl::changePlotPoint(S32 plotID, S32 i, Point2F v) |
| 387 | { |
no test coverage detected