i want to inverse the text in a line and another lines show normally and without inverse in verifone vx520. i use inverse_toggle() function but this function inverse whole of page and not a line. how can i inverse just a line and another lines show as normal?
here is my code:
int display = open(DEV_CONSOLE, 0);
inverse_toggle();
write(display,"first line to inverse\n",22); //i want to inverse just this line
write(display,"second line shown normally\n",27);//i want to show this line normally
I have never played with inverse_toggle or setinverse, but I am noticing that you are not toggling it back off. Try this:
int display = open(DEV_CONSOLE, 0);
inverse_toggle();
write(display,"first line to inverse\n",22);
inverse_toggle(); // new line
write(display,"second line shown normally\n",27);
For more control, use setinverse. Also, check out display_at. I think you'll find it a more user friendly option than write
int display = open(DEV_CONSOLE, 0);
setinverse(1); // explicitly turn inverse on
display_at(1, // x
1, // y
"first line to inverse", // no /n needed since we are specifying x and y
NO_CLEAR); //defined in ACLCONIO.H. Other options are CLR_LINE and CLR_EOL
setinverse(0); // explicitly turn inverse off
display_at(1, 2, display,"second line shown normally", NO_CLEAR);
If that doesn't work, you could always use the font tool to make a new font instead (although that would be more work).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With