瀏覽代碼

cursor color should follow text_fg color

David Rose 16 年之前
父節點
當前提交
26332522da
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      panda/src/pgui/pgEntry.I
  2. 1 1
      panda/src/pgui/pgEntry.cxx
  3. 1 1
      panda/src/pgui/pgEntry.h

+ 1 - 1
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;

+ 1 - 1
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());

+ 1 - 1
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);