Page 1 of 1

2 Replies - 3060 Views - Last Post: 11 October 2009 - 10:22 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=131309&amp;s=cc15ed915b6f9ac4802b42d37e64b235&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 poncho4all

Reputation: 123
• Posts: 1,405
• Joined: 15-July 09

Posted 11 October 2009 - 07:21 AM

Well im trying to put a blinking line after the text like in every text editor.
But i cant see how to the one right now gets to far away from the text after a few letters.
```#include<iostream>
#include"graphics.h"
using namespace std;

int letra=0,i=0,cont=0,place=0,s=0;
char temp[1];
while(!kbhit()){
setcolor(WHITE);
setcolor(BLACK);
}
while(letra!=13){
letra=getch();
if(letra==13){
break;
}else
if(letra==8){
--i;
cleardevice();
setcolor(WHITE);
}else{
temp[0]=letra;
temp[1]='\x0';
setcolor(WHITE);
i++;
}
while(!kbhit()){
setcolor(WHITE);
delay(5);
setcolor(BLACK);
}
}
}
int main(){
int gd=DETECT, gm;
int mx,my;
initgraph(&gd,&gm,"");
while(!ismouseclick(WM_LBUTTONDOWN)){
delay(1);
}
getmouseclick(WM_LBUTTONDOWN,mx,my);
closegraph();
cin.get();
return 0;
}

```

Anyone knows a better way?

Is This A Good Question/Topic? 0

Replies To: Blink after text with graphics

#2 ccubed

• It's That Guy

Reputation: 159
• Posts: 1,402
• Joined: 13-June 08

Re: Blink after text with graphics

Posted 11 October 2009 - 10:18 AM

There really isn't. The only way to get blinking text is using the ASCII escape sequences. And what do you mean it gets too far away?

#3 poncho4all

Reputation: 123
• Posts: 1,405
• Joined: 15-July 09

Re: Blink after text with graphics

Posted 11 October 2009 - 10:22 AM

Well for the first five six letters it is right where it should be beside the letter but after that it moves away like " " from the letter

[EDIT]NVM i didnt knew about the acsii sequence thank you sir

This post has been edited by poncho4all: 11 October 2009 - 10:24 AM