|
@@ -25,7 +25,8 @@
|
|
|
INLINE PGTop::
|
|
INLINE PGTop::
|
|
|
PGTop(const PGTop ©) :
|
|
PGTop(const PGTop ©) :
|
|
|
PandaNode(copy),
|
|
PandaNode(copy),
|
|
|
- _watcher(copy._watcher)
|
|
|
|
|
|
|
+ _watcher(copy._watcher),
|
|
|
|
|
+ _start_sort(copy._start_sort)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -41,6 +42,43 @@ get_mouse_watcher() const {
|
|
|
return _watcher;
|
|
return _watcher;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+// Function: PGTop::set_start_sort
|
|
|
|
|
+// Access: Published
|
|
|
|
|
+// Description: Specifies the sort index that is assigned during the
|
|
|
|
|
+// traversal to the first PGItem that is discovered
|
|
|
|
|
+// during traversal. Subsequent PGItems will be
|
|
|
|
|
+// assigned consecutively higher sort indexes.
|
|
|
|
|
+//
|
|
|
|
|
+// This number is used by the MouseWatcher system to
|
|
|
|
|
+// rank the clickable mouse regions in the same order in
|
|
|
|
|
+// which the items are rendered, so that items on top
|
|
|
|
|
+// will receive mouse priority.
|
|
|
|
|
+//
|
|
|
|
|
+// Normally, it makes the most sense to leave this
|
|
|
|
|
+// initial value at its default value of 0, unless you
|
|
|
|
|
+// need the PGItems to have a particular sort value with
|
|
|
|
|
+// respect to some other objects in the scene
|
|
|
|
|
+// (particularly with a second PGTop node).
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+INLINE void PGTop::
|
|
|
|
|
+set_start_sort(int start_sort) {
|
|
|
|
|
+ _start_sort = start_sort;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+// Function: PGTop::get_start_sort
|
|
|
|
|
+// Access: Published
|
|
|
|
|
+// Description: Returns the sort index that is assigned during the
|
|
|
|
|
+// traversal to the first PGItem that is discovered
|
|
|
|
|
+// during traversal. See set_start_sort().
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+INLINE int PGTop::
|
|
|
|
|
+get_start_sort() const {
|
|
|
|
|
+ return _start_sort;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: PGTop::add_region
|
|
// Function: PGTop::add_region
|
|
|
// Access: Public
|
|
// Access: Public
|