[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13987] trunk/blender/source/blender/src/ drawtext.c: Change the current line number to the cursor color when line numbers is toggled

Ricki Myers antihc3 at gmail.com
Thu Mar 6 02:54:05 CET 2008


Revision: 13987
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13987
Author:   themyers
Date:     2008-03-06 02:54:04 +0100 (Thu, 06 Mar 2008)

Log Message:
-----------
Change the current line number to the cursor color when line numbers is toggled

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawtext.c

Modified: trunk/blender/source/blender/src/drawtext.c
===================================================================
--- trunk/blender/source/blender/src/drawtext.c	2008-03-06 01:21:40 UTC (rev 13986)
+++ trunk/blender/source/blender/src/drawtext.c	2008-03-06 01:54:04 UTC (rev 13987)
@@ -1037,7 +1037,12 @@
 	
 	for (i=0; i<st->viewlines && tmp; i++, tmp= tmp->next) {
 		if(st->showlinenrs) {
-			BIF_ThemeColor(TH_TEXT);
+			/*Change the color of the current line the cursor is on*/
+			if(tmp == text->curl) { 
+				BIF_ThemeColor(TH_HILITE);
+			} else {
+				BIF_ThemeColor(TH_TEXT);
+			}
 			if(((float)(i + linecount + 1)/10000.0) < 1.0) {
 				sprintf(linenr, "%4d", i + linecount + 1);
 				glRasterPos2i(TXT_OFFSET - 7, curarea->winy-st->lheight*(i+1));
@@ -1045,6 +1050,7 @@
 				sprintf(linenr, "%5d", i + linecount + 1);
 				glRasterPos2i(TXT_OFFSET - 11, curarea->winy-st->lheight*(i+1));
 			}
+			BIF_ThemeColor(TH_TEXT);
 			BMF_DrawString(spacetext_get_font(st), linenr);
 			text_draw(st, tmp->line, st->left, 0, 1, TXT_OFFSET + TEXTXLOC, curarea->winy-st->lheight*(i+1), tmp->format);
 		} else





More information about the Bf-blender-cvs mailing list