@@ -334,12 +334,12 @@ void lcViewManipulator::DrawSelectMove(lcTrackButton TrackButton, lcTrackTool Tr
334334 {
335335 if ((TrackTool == lcTrackTool::MoveX) || (TrackTool == lcTrackTool::MoveXY) || (TrackTool == lcTrackTool::MoveXZ))
336336 {
337- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
337+ Context->SetColor (mColorXAxisSelected );
338338 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 0 );
339339 }
340340 else if (TrackButton == lcTrackButton::None)
341341 {
342- Context->SetColor (0 . 8f , 0 . 0f , 0 . 0f , 1 . 0f );
342+ Context->SetColor (mColorXAxis );
343343 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 0 );
344344 }
345345 }
@@ -348,12 +348,12 @@ void lcViewManipulator::DrawSelectMove(lcTrackButton TrackButton, lcTrackTool Tr
348348 {
349349 if (((TrackTool == lcTrackTool::MoveY) || (TrackTool == lcTrackTool::MoveXY) || (TrackTool == lcTrackTool::MoveYZ)) && (AllowedTransforms & LC_OBJECT_TRANSFORM_MOVE_Y ))
350350 {
351- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
351+ Context->SetColor (mColorYAxisSelected );
352352 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 36 * 2 );
353353 }
354354 else if (TrackButton == lcTrackButton::None)
355355 {
356- Context->SetColor (0 . 0f , 0 . 8f , 0 . 0f , 1 . 0f );
356+ Context->SetColor (mColorYAxis );
357357 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 36 * 2 );
358358 }
359359 }
@@ -362,12 +362,12 @@ void lcViewManipulator::DrawSelectMove(lcTrackButton TrackButton, lcTrackTool Tr
362362 {
363363 if (((TrackTool == lcTrackTool::MoveZ) || (TrackTool == lcTrackTool::MoveXZ) || (TrackTool == lcTrackTool::MoveYZ)) && (AllowedTransforms & LC_OBJECT_TRANSFORM_MOVE_Z ))
364364 {
365- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
365+ Context->SetColor (mColorZAxisSelected );
366366 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 72 * 2 );
367367 }
368368 else if (TrackButton == lcTrackButton::None)
369369 {
370- Context->SetColor (0 . 0f , 0 . 0f , 0 . 8f , 1 . 0f );
370+ Context->SetColor (mColorZAxis );
371371 Context->DrawIndexedPrimitives (GL_TRIANGLES , 36 , GL_UNSIGNED_SHORT , 72 * 2 );
372372 }
373373 }
@@ -378,29 +378,29 @@ void lcViewManipulator::DrawSelectMove(lcTrackButton TrackButton, lcTrackTool Tr
378378 if (AllowedTransforms & LC_OBJECT_TRANSFORM_ROTATE_X )
379379 {
380380 if (TrackTool == lcTrackTool::RotateX)
381- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
381+ Context->SetColor (mColorXAxisSelected );
382382 else
383- Context->SetColor (0 . 8f , 0 . 0f , 0 . 0f , 1 . 0f );
383+ Context->SetColor (mColorXAxis );
384384
385385 Context->DrawIndexedPrimitives (GL_TRIANGLES , 120 , GL_UNSIGNED_SHORT , 108 * 2 );
386386 }
387387
388388 if (AllowedTransforms & LC_OBJECT_TRANSFORM_ROTATE_Y )
389389 {
390390 if (TrackTool == lcTrackTool::RotateY)
391- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
391+ Context->SetColor (mColorYAxisSelected );
392392 else
393- Context->SetColor (0 . 0f , 0 . 8f , 0 . 0f , 1 . 0f );
393+ Context->SetColor (mColorYAxis );
394394
395395 Context->DrawIndexedPrimitives (GL_TRIANGLES , 120 , GL_UNSIGNED_SHORT , (108 + 120 ) * 2 );
396396 }
397397
398398 if (AllowedTransforms & LC_OBJECT_TRANSFORM_ROTATE_Z )
399399 {
400400 if (TrackTool == lcTrackTool::RotateZ)
401- Context->SetColor (0 . 8f , 0 . 8f , 0 . 0f , 1 . 0f );
401+ Context->SetColor (mColorZAxisSelected );
402402 else
403- Context->SetColor (0 . 0f , 0 . 0f , 0 . 8f , 1 . 0f );
403+ Context->SetColor (mColorZAxis );
404404
405405 Context->DrawIndexedPrimitives (GL_TRIANGLES , 120 , GL_UNSIGNED_SHORT , (108 + 240 ) * 2 );
406406 }
@@ -763,7 +763,18 @@ void lcViewManipulator::DrawRotate(lcTrackButton TrackButton, lcTrackTool TrackT
763763 {
764764 if (static_cast <int >(TrackTool) == static_cast <int >(lcTrackTool::RotateX) + PlaneIndex)
765765 {
766- Context->SetColor (0 .8f , 0 .8f , 0 .0f , 1 .0f );
766+ switch (PlaneIndex)
767+ {
768+ case 0 :
769+ Context->SetColor (mColorXAxisSelected );
770+ break ;
771+ case 1 :
772+ Context->SetColor (mColorYAxisSelected );
773+ break ;
774+ case 2 :
775+ Context->SetColor (mColorZAxisSelected );
776+ break ;
777+ }
767778 }
768779 else
769780 {
@@ -772,15 +783,15 @@ void lcViewManipulator::DrawRotate(lcTrackButton TrackButton, lcTrackTool TrackT
772783
773784 switch (PlaneIndex)
774785 {
775- case 0 :
776- Context->SetColor (200 . 0f / 255 . 0f , 40 . 0f / 255 . 0f , 60 . 0f / 255 . 0f , 1 . 0f );
777- break ;
778- case 1 :
779- Context->SetColor (120 . 0f / 255 . 0f , 200 . 0f / 255 . 0f , 20 . 0f / 255 . 0f , 1 . 0f );
780- break ;
781- case 2 :
782- Context->SetColor (60 . 0f / 255 . 0f , 120 . 0f / 255 . 0f , 240 . 0f / 255 . 0f , 1 . 0f );
783- break ;
786+ case 0 :
787+ Context->SetColor (mColorXAxis );
788+ break ;
789+ case 1 :
790+ Context->SetColor (mColorYAxis );
791+ break ;
792+ case 2 :
793+ Context->SetColor (mColorZAxis );
794+ break ;
784795 }
785796 }
786797
0 commit comments