MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setValue

Method setValue

Engine/source/gui/controls/guiBitmapCtrl.cpp:212–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void GuiBitmapCtrl::setValue(S32 x, S32 y)
213{
214 if (mBitmap)
215 {
216 x += mBitmap->getWidth() / 2;
217 y += mBitmap->getHeight() / 2;
218 }
219 while (x < 0)
220 x += 256;
221 mStartPoint.x = x % 256;
222
223 while (y < 0)
224 y += 256;
225 mStartPoint.y = y % 256;
226}
227
228DefineEngineMethod( GuiBitmapCtrl, setValue, void, ( S32 x, S32 y ),,
229 "Set the offset of the bitmap within the control.\n"

Callers 3

guiBitmapCtrl.cppFile · 0.45
_setValueFunction · 0.45
recurseInsertMethod · 0.45

Calls 2

getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected