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

Method Draw

ReClass/CNodeVec2.cpp:22–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected