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

Method writeGuides

Engine/source/gui/editor/guiEditCtrl.cpp:1805–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803//-----------------------------------------------------------------------------
1804
1805void GuiEditCtrl::writeGuides( guideAxis axis, GuiControl* ctrl )
1806{
1807 // Store the guide indices of the given axis in a vector on the respective
1808 // dynamic property of the control.
1809
1810 StringBuilder str;
1811 bool isFirst = true;
1812 for( U32 i = 0, num = mGuides[ axis ].size(); i < num; ++ i )
1813 {
1814 if( !isFirst )
1815 str.append( ' ' );
1816
1817 char buffer[ 32 ];
1818 dSprintf( buffer, sizeof( buffer ), "%i", mGuides[ axis ][ i ] );
1819
1820 str.append( buffer );
1821
1822 isFirst = false;
1823 }
1824
1825 String value = str.end();
1826 ctrl->setDataField( smGuidesPropertyName[ axis ], NULL, value );
1827}
1828
1829//-----------------------------------------------------------------------------
1830

Callers 1

guiEditCtrl.cppFile · 0.80

Calls 5

dSprintfFunction · 0.85
sizeMethod · 0.45
appendMethod · 0.45
endMethod · 0.45
setDataFieldMethod · 0.45

Tested by

no test coverage detected