@EditWaypoint.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class EditWaypoint : Memc<EditWaypointPoint>
  4. {
  5. static int FindI(C Memc<EditWaypointPoint> &waypoints, C UID &waypoint_id);
  6. static EditWaypointPoint* Find ( Memc<EditWaypointPoint> &waypoints, C UID &waypoint_id);
  7. bool removed;
  8. Game::Waypoint::LOOP_MODE loop_mode;
  9. Str name;
  10. TimeStamp removed_time, loop_mode_time, name_time;
  11. void del();
  12. int findI(C UID &waypoint_id)C;
  13. EditWaypointPoint* find (C UID &waypoint_id);
  14. C EditWaypointPoint* find (C UID &waypoint_id)C;
  15. int liveIndex(C UID &waypoint_id);
  16. bool newer(C EditWaypoint &src)C;
  17. bool equal(C EditWaypoint &src)C;
  18. bool getRect(Rect &rect)C;
  19. bool hasExisting()C;
  20. UID firstExisting()C;
  21. UID existingNear(C UID &point_id)C;
  22. Vec pos()C;
  23. int existingPoints()C;
  24. EditWaypoint& setRemoved (bool removed );
  25. EditWaypoint& setLoopMode(Game::Waypoint::LOOP_MODE loop_mode);
  26. EditWaypoint& setName (C Str &name );
  27. bool sync(C EditWaypoint &src);
  28. void undo(C EditWaypoint &src);
  29. int move(C UID &point_id, int index);
  30. EditWaypoint& reverse();
  31. EditWaypoint& rotateLeft();
  32. EditWaypoint& rotateRight();
  33. void create(C Game::Waypoint &src, C Str &name);
  34. bool copyTo(Game::Waypoint &w);
  35. // draw
  36. void draw(C Color &color=WHITE, int edge_smooth_steps=1);
  37. void drawText(C UID &sel, C UID &lit);
  38. // io
  39. bool save(File &f)C;
  40. bool load(File &f);
  41. bool load(C Str &name);
  42. public:
  43. EditWaypoint();
  44. };
  45. /******************************************************************************/
  46. /******************************************************************************/
  47. /******************************************************************************/