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

Method Draw

ReClass/CNodeQuat.cpp:22–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22NODESIZE CNodeQuat::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 AddSelection( View, 0, y, g_FontHeight );
33 AddDelete( View, x, y );
34 AddTypeDrop( View, x, y );
35
36 tx = x + TXOFFSET;
37 tx = AddIcon( View, tx, y, ICON_VECTOR, -1, -1 );
38 tx = AddAddressOffset( View, tx, y );
39 tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "Vec4 " ) );
40 tx = AddText( View, tx, y, g_crName, 69, _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 tx = AddText( View, tx, y, g_crValue, 3, _T( "%0.3f" ), Data[3] );
52 tx = AddText( View, tx, y, g_crName, HS_NONE, _T( ")" ) );
53 }
54 tx += g_FontWidth;
55 tx = AddComment( View, tx, y );
56
57 DrawSize.x = tx;
58 DrawSize.y = y + g_FontHeight;
59 return DrawSize;
60}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected