gui_linelist.cpp 646 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef _XBOX
  2. #include "gui_linelist.h"
  3. // GUIList<GUIGraphLine*> Lines;
  4. bool Compare (GUIGraphLine* const& line1, GUIGraphLine* const& line2)
  5. {
  6. if (line1->bActive) return false;
  7. if (line2->bActive) return true;
  8. return false;
  9. }
  10. GUILineList::GUILineList () : Lines (_FL_, 64)
  11. {
  12. }
  13. GUILineList::~GUILineList ()
  14. {
  15. }
  16. void GUILineList::Add (GUIGraphLine* line)
  17. {
  18. Lines.Add(line);
  19. }
  20. int GUILineList::GetCount ()
  21. {
  22. return Lines.Size();
  23. }
  24. void GUILineList::Remove (int num)
  25. {
  26. Lines.DelIndex(num);
  27. }
  28. GUIGraphLine* GUILineList::GetLine (int num)
  29. {
  30. return Lines[num];
  31. }
  32. void GUILineList::SortByActive ()
  33. {
  34. Lines.QSort(Compare);
  35. }
  36. #endif