diff --git a/panda/src/pgui/pgEntry.I b/panda/src/pgui/pgEntry.I index dfb69551b2..32e5327672 100644 --- a/panda/src/pgui/pgEntry.I +++ b/panda/src/pgui/pgEntry.I @@ -305,7 +305,7 @@ get_blink_rate() const { // the cursor. You can attach suitable cursor geometry // to this node. //////////////////////////////////////////////////////////////////// -INLINE const NodePath &PGEntry:: +INLINE NodePath PGEntry:: get_cursor_def() { LightReMutexHolder holder(_lock); return _cursor_def; diff --git a/panda/src/pgui/pgEntry.cxx b/panda/src/pgui/pgEntry.cxx index f68b46c15d..345485cf1e 100644 --- a/panda/src/pgui/pgEntry.cxx +++ b/panda/src/pgui/pgEntry.cxx @@ -647,7 +647,7 @@ setup_minimal(float width, int num_lines) { clear_cursor_def(); LineSegs ls; - ls.set_color(0.0f, 0.0f, 0.0f, 1.0f); + ls.set_color(text_node->get_text_color()); ls.move_to(0.0f, 0.0f, -0.15f * line_height); ls.draw_to(0.0f, 0.0f, 0.70f * line_height); get_cursor_def().attach_new_node(ls.create()); diff --git a/panda/src/pgui/pgEntry.h b/panda/src/pgui/pgEntry.h index 5facfbdc99..6dd2aa5099 100644 --- a/panda/src/pgui/pgEntry.h +++ b/panda/src/pgui/pgEntry.h @@ -98,7 +98,7 @@ PUBLISHED: INLINE void set_blink_rate(float blink_rate); INLINE float get_blink_rate() const; - INLINE const NodePath &get_cursor_def(); + INLINE NodePath get_cursor_def(); INLINE void clear_cursor_def(); INLINE void set_cursor_keys_active(bool flag);