MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / Draw

Method Draw

ReClass/CNodeVec3.cpp:22–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22NODESIZE CNodeVec3::Draw( const PVIEWINFO View, int x, int y )
23{
24 NODESIZE DrawSize;
25 float* Data;
26
27 if (m_bHidden)
28 return DrawHidden( View, x, y );
29
30 Data = (float*)(View->Data + m_Offset);
31
32 AddSelection( View, 0, y, g_FontHeight );
33 AddDelete( View, x, y );
34 AddTypeDrop( View, x, y );
35
36 int tx = x + TXOFFSET;
37 tx = AddIcon( View, tx, y, ICON_VECTOR, HS_NONE, HS_NONE );
38 tx = AddAddressOffset( View, tx, y );
39 tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "Vec3 " ) );
40 tx = AddText( View, tx, y, g_crName, HS_NAME, _T( "%s" ), m_strName );
41 tx = AddOpenClose( View, tx, y );
42 if (m_LevelsOpen[View->Level])
43 {
44 tx = AddText( View, tx, y, g_crName, HS_NONE, _T( "(" ) );
45 tx = AddText( View, tx, y, g_crValue, 0, _T( "%0.3f" ), Data[0] );
46 tx = AddText( View, tx, y, g_crName, HS_NONE, _T( "," ) );
47 tx = AddText( View, tx, y, g_crValue, 1, _T( "%0.3f" ), Data[1] );
48 tx = AddText( View, tx, y, g_crName, HS_NONE, _T( "," ) );
49 tx = AddText( View, tx, y, g_crValue, 2, _T( "%0.3f" ), Data[2] );
50 tx = AddText( View, tx, y, g_crName, HS_NONE, _T( ")" ) );
51 }
52 tx += g_FontWidth;
53 tx = AddComment( View, tx, y );
54
55 DrawSize.x = tx;
56 DrawSize.y = y + g_FontHeight;
57 return DrawSize;
58}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected